When you steal from protected property or kill a faction member, you leave behind clues in the form of blood or footprints. When a certain amount of said clues are turned in as evidence against you, you'll be faced with a choice of either a trial or immediate jail time upon your next death or login.
Trials may increase or decrease your jail time depending on what the jurors (level 30 players who accept an invite) decide. If you end up doing time, you can kill rats, play soccer, or try to escape. While incarcerated, you lose access to your hotbars, and the penalty remains in effect for an unspecified time should you make a successful escape. While there are still several aspects of the criminal system that remain unclear, you can get a glimpse of it via the German-language video after the cut.
[Thanks to Dengar for the tip!]