30 Prisons, some of which are dreadful places in which to be, whilst others can be surprisingly pleasant, as far as somewhere can be pleasant when you are not allowed to leave it. Some are short term places of confinement, others are where you will spend the rest of your life unless you manage to escape.
Most criminals who are locked up as a punishment or to await trial are just confined in regular cellblocks or jails, but not all of them. Some are so dangerous that ordinary prisons just will not hold them. Others have secrets that cannot be allowed to be spread, or their crimes are so dreadful that they deserve a greater punishment then normal incarceration or even execution. In yet other cases the ruler had a nasty sense of humour...
In cases where a person has accused another of a crime, but there are no other supporters of the accusation or defenders of the accused, and there is not enough evidence to support one party or the other, the two people involved, or their champions in some cases, must duel in the presence of the local ruler or leader. The loser is assumed to be lying and punished accordingly.