Something illegal is against the law or breaks the rules. If you're reading this in jail, you've probably done something illegal, and if you're not in jail, there's plenty of time to obey the law.
You can use the adjective illegal to describe breaking the rules, as when you head-butt someone in a game. Acts that go against the law, such as robbing a bank, are also illegal. There is a wide range of things called illegal, from small acts to big ones, but no matter the seriousness, if it is against the law, it is illegal. This adjective also describes people who enter countries without official government approval, they are called "illegal immigrants" or "illegal aliens."