Bail was a payment that secured temporary release from prison for an individual accused of a crime.
In 2269, one of Adam's songs mentioned a judge refusing to let his mind out on bail, metaphorically speaking. (TOS: "The Way to Eden")
Beckett Mariner was bailed out of a Ferengi jail in 2381 by Quimp after Mariner started a bar fight. (LD: "Parth Ferengi's Heart Place")