Constitutionality is said to be the condition of acting in accordance with an applicable constitution; the status of a law, a procedure, or an act's accordance with the laws or set forth in the applicable constitution. When laws, procedures, or acts directly violate the constitution, they are unconstitutional. All others are considered constitutional unless the country in question has a mechanism for challenging laws as unconstitutional.
However, governments do not only create laws but also enforce the laws set forth in the document defining the government, which is the constitution.
When the proper court determines that a legislative act or law conflicts with the constitution, it finds that law unconstitutional and declares it void in whole or in part.
Depending on the type of legal system, a statute may be declared unconstitutional by any court or only by special constitutional courts with authority to rule on the validity of a statute.
In some countries, the legislature may create any law for any purpose, and there is no provision for courts to declare a law unconstitutional. That can occur either because the country has no codified constitution that laws must conform to like in the United Kingdom and New Zealand or because the constitution is codified, but no court has the authority to strike down laws on the basis of it like in the Netherlands and Switzerland.
In many jurisdictions, the supreme court or constitutional court is the final legal arbiter that renders an opinion on whether a law or an action of a government official is constitutional. Constitutions define the powers of government, Thus, national constitutions typically apply only to government actions. Only governments can then violate the nation's constitution, but there are exceptions.
Here are some examples of unconstitutional actions: