No, it is not illegal to plagiarize. Since it is stealing the works of others and claiming it to be your own, this is a violation of ethics and it can cause serious penalties to the writer. The original author or the institution can take disciplinary action against you.