"Sanctions" is a general term that refers to any type of punishment administered by law as a means of deterrent against performing crimes, and generally keeping in line with the law. Sanctions have several forms, depending on the type of case the accused is being prosecuted for - for example, those involved in civil cases are usually sanctioned financially, ordered to pay a certain sum of money to the parties involved in the case. On the other hand, sanctions for criminal offenses can vary from monetary fines to incarceration and, depending on the jurisdiction, capital punishment.
It's interesting to note that sanctions may be issued by a judge even in the process of a legal proceeding, for issues not entirely related to the court events. For example, a sanction could be issued for court misconduct, or for a crime which has been brought to light that's not related to the current proceedings and does not warrant a case of its own.
Sanctions are normally issued by judges, though in some cases they need to be voted on by a jury, with the judge only serving to approve of the sanction and announce it to the attendants of the court. Some severe forms of sanctions may lead to the closing of a case entirely, which is actually the most severe type of sanctions which can be issued in civil court - dismissing the case and deciding it in favor of the defendant.