Capiche. But no capiche.
A friend of mine got a DUI last year at this time, killed a 15 year old boy. He had to post $45000 for bail. His parents fronted the entire amount in cash.
You get the money back if you appear in court like you're supposed to (or whatever is asked of you to do). If not, all that money goes to the state/gov.
I'm no expert on these things (I'm proud of that actually!), so, maybe it varies state to state?