The jail is a dungeon feature found on lower levels of the dungeon. It consists of a jail cell containing a prisoner who may be released if the player possesses a skeleton key or lockpick. The prisoner (a member of a random player class) may then join the player and function similarly to a pet.
When approaching a jail cell, be careful not to use any spells or attacks that might hit the prisoner; they will then become hostile to the player if released.
your allied prisoner may try to open store owners chests (only saw once with a prisoner named "elzua" or something at dwarf smith. sounds like a thief name and my theory is this may only occur with thief class prisoners *needs testing)