Illegal means any action that is not permitted by law. People who commit illegal acts can be tried in a court of law. If they are found guilty, they can be subject to legal consequences or punishment. The more severe the illegal action, the more harsh the punishment can be.
An example of an illegal act that could result in punishment is assault. A person found guilty of assault could face jail time. Other acts that are considered illegal include breaking and entering, fraud, theft, forgery, battery, speeding, etc. It is not always clear if a person who is accused of doing something illegal has actually done the suspected activity. The legal process exists for this exact reason. Accused persons, also known as defendants, have the right to defend against the accusation before a judge or a jury in a court of law.