Not illegal in and of itself, but it's something that can involve a civil lawsuit in the "real world"
In academia, it's an extremely serious accusation. If you're found guilty of it, you can wind up failing an assigment, a course, or you can even be permanently expelled. And sort of "scarlet lettered". Your degrees or awards given to you may be revoked, you could lose your job if you work in a journalist organization. The punishment for passing other work without attribution is pretty serious.