Jail is a place that lawyers can send you to if your fine exceeds $2,500. You get fines by attacking lawyers. You will be teleported to a small, dark cell underground with some undead lawyers and a skeleton spawner. All of your stuff will be taken away, but you can take it back later. If you are near some of your pets, they will be put in jail somewhere as well.
The Great Escape
Now you got in. Now get smart. In order to get out, you will need to employ a hit-and-run tactic if you want to get your stuff back. A suggested escape method is this: Take the torch from the room you were teleported to, then run to the skeleton spawner and place it on top of it. This will prevent further skeletons from spawning. Then run around grabbing your stuff from the chests until you are ready to take on the undead lawyers from hell, then go to the iron door blocking your exit. Smash the block underneath it to get through, and climb up the stairs until you come to mud. Dig through this and you are free! You will have learned to beat up lawyers (probably).
When you are roaming the halls of the jail, you will come across more jail cells. Some will contain prisoners who were wrongfully put in jail. If you help them escape jail they will reward you (or just call you a sucker and run the hell away), and you can also get achievements for breaking them out.