For a layman, what is the difference between illegal and unconstitutional? These two words have been abused in several debates and political forums in the last two decades that they have been used interchangeably for sake of convenience.
Illegal is violating the law
Because there is a law against something, it is illegal. For example, Murder is illegal because a law prohibits killing someone for any reason but self-defense.
Unconstitutional is a law that contradicts the constitution
This is more easily shown with an example:
Let's assume that the constitution of Borovia contains a provision that enshrines equality of humans:
Article 1: Every human is to be treated the same way by any law. Gender, Sex, the color of skin, hair, eyes, and choice of faith shall not be allowed to treat any group differently from another.
Also, Our country's criminal code contains a right to a lawyer:
Criminal Code Sect. 1234: All Humans have the right to an attorney when accused. Its costs are to be paid by the state.
Now, the lawmaker invents the following addition to that law:
Criminal Code Sect. 1234-A: Humans with blue skin, yellow, and black hair are excluded from CC §1234.
This law clearly contradicts with Article 1 of Borovia's constitution, as it excludes one group of human, even if this group does not seem to exist naturally. This law is thus unconstitutional.
All unconstitutional laws are illegal laws
Because an unconstitutional law violates a higher law than itself (the constitution is a law after all), it is also illegal.
Not all illegal laws are unconstitutional
As laws come in different ranks, a law can be illegal and not violate the constitution at the same time. This happens especially with very low ranked laws such as a city ordinance.
Let's assume Borovia's code of roads and street traffic contains this:
§12 On all streets a double-yellow line shall mark areas of non-parking. No other areas shall be deemed off-limit for parking, and no other signage is allowed.
And the town of Boron enacts this city ordinance:
Ord. 123456: On Main Sreet, no car shall be parked. Signs shall be placed on the side of the road to preserve the historic cobblestone.
The street and traffic code forbids alternate markings, but the city ordinance demands a different marking. That makes it an illegal law, but it does not violate the constitution, so the ordinance is not unconstitutional.