Bail can be paid to the court to avoid jail time. This amount is decided usually by a judge at arraignment, and does not have to be paid specifically by the defendant once the amount is decided. A bondsman can be engaged to pay or certify the bail amount, and get the defendant out of prison before court.
This person or even bail agency can have the bail paid through collateral money or property is set forth by the defendant to the bondsman. Bondsman are very skilled at getting their defendants out of jail fast, usually getting them out in a matter of hours or a day max once bail is paid.