How does bail work?