Whether or not you get money back depends on how you pay in order to be released from jail. If you pay cash bail directly to the court and the defendant appears at all of the required court dates, the entire amount will be returned to you minus any court fees. If the defendant is found guilty, court fees could potentially reduce the amount of bail you get back by a large amount. If the defendant does not make all of the required court appearances or gets arrested again while out on bail, the entire bail amount is forfeited and you will not get any money back.
Bond is different from bail. Bond is something that is offered by a bail bond company that makes that bail bond company responsible for the defendant’s appearance in court. You can buy a bond from a bail bonding company for a percentage (typically 10%) of the total amount of bail money owed. The bail bond company then pays the bail to the courts. The bond is not returned to you even if the defendant appears at court because the bail bond company paid the defendant’s bail for you, and the fee that you paid was the price for them to do so. Bond also does not cover any court fees; those will have to be paid separately. Bond companies also require that you put down some sort of collateral; since they are essentially giving you a loan they want to be sure that you have something with which you can pay them back if the defendant does not appear at court.