In the Harry Potter series, wizards who have committed serious crimes are imprisoned in Azkaban, the wizarding prison. It appears that the wizarding world has a justice system which is completely separate from the muggle world, but includes parallels such as courts and prisons. Given the size of the wizarding world and the infrequency of serious crimes that justify imprisonment, one court, the Wizengamot, appears to be sufficient to handle major trials.
Minor crimes are handled by the Department of Magical Law Enforcement, which is part of the Ministry of Magic. Most of these crimes relate to magic that could be seen by muggles, or magic that actively harms muggles. For crimes requiring serious investigation, Aurors are used. Aurors are wizards specially trained to handle issues pertaining to the Dark Arts: they appear to be of above average intelligence and training to reflect their often dangerous jobs. When a wizard is convicted to a sentence in Azkaban, an auror has probably gathered the evidence leading to conviction.
Sentences of internment in Azkaban seem to vary in length from a few months to a lifetime. Whatever the length of the sentence, time in Azkaban appears to be utterly miserable. The prison is located on a windswept island that is constantly cold and dark, and it is guarded by Dementors, magical creatures which suck joy and happiness out of their victims. The death penalty is not used in the wizard world: people who commit serious crimes are subject to the Dementor's Kiss, a process where the soul is sucked from the body by a Dementor. The victim is still alive, but exists essentially like a vegetable.
The allegiance between the Ministry of Magic and Dark creatures like Dementors at Azkaban is a topic of much debate and discussion in the wizarding world. Dumbledore, for example, repeatedly warns the Ministry that the Dementors are dangerous, and could easily be turned to the side of Voldemort, as they are in the sixth book. Ministry of Magic employees also exhibit discomfort with the Dementors during visits to Azkaban.
While Harry has never been to Azkaban, he has interacted with a number of characters who have, starting with his godfather, Sirius Black, who was wrongly imprisoned in Azkaban for many years. Rubeus Hagrid, one of Harry's close friends and advisors, also briefly spends time in the prison. In the fifth book, Harry is responsible for sending several Dark wizards to Azkaban including Lucius Malfoy. The social disruption caused by the rise of Voldemort has made Azkaban essentially useless as a location for imprisonment, since the Dementors no longer guard it, and law enforcement personnel are busy trying to track down Voldemort himself.