In general, conviction means a strong persuasion or belief. It also means the state of being convinced.
In law, a conviction is the verdict that results when a court of law finds a defendant guilty of a crime.
The opposite of a conviction is an acquittal (i.e. "not guilty"). In Scotland and in the Netherlands, there can also be a verdict of "not proven", which counts as an acquittal. There are also cases where the court orders that a defendant not be convicted, despite being found guilty.
For a host of reasons, the criminal justice system is not perfect, and sometimes guilty defendants are acquitted, while innocent people are convicted. Appeal mechanisms mitigate this problem to some extent. An error which results in the conviction of an innocent person is known as a miscarriage of justice.
After a defendant is convicted, the court determines the appropriate sentence as a punishment. Furthermore, the conviction may lead to results beyond the terms of the sentence itself. Such ramifications are known as the collateral consequences of criminal charges.