A local bail bonds company can explain this process to you in greater detail. However, in general, if you post a bond and get an individual out on bail and that individual fails to show up for his or her court date, then the court has the right to keep your money. If he or she makes all their court appearances then your money will be returned. If you go through a bail bonding company then you will be paying a fee for the convenience of loaning their money to post the bond (e.g., 8-12% of the bail amount)
Disclaimer: I am a lawyer licensed in the State of Minnesota only, and I am not your lawyer. This communication is not intended as legal advice, and no attorney client relationship results. Please consult your own attorney for legal advice. This is for entertainment purposes only.
In New York, if you post bail and if your friend makes all of his court dates, then when the case is over, you will get back all of the bail money except for 3% which goes to the city. If the case ends up getting dismissed or your friend is found not guilty after a trial, then you will get back all of the money.
Once the bail is posted, it takes a few hours for the Department of Corrections to process it and release your friend.
A bail bondsman will usually ask for approximately 40% up front and collateral for the balance (some bail bondsmen are more flexible than others). And they charge a fee, like my colleague says.