In general, when someone is arrested for an infraction or misdemeanor, they may be released with a citation based upon their promise to appear. Things are different when it comes to felonies or "wobblers." (Wobblers are cases that can be charged as either felonies or misdemeanors.) In those cases, while it is possible to be released on their own recognizance, a bail hearing may be required.
Each county has a bail schedule, which lists the bail that applies to each different type of case. It is possible to get that amount lowered, depending upon the type of crime that is charged, and the history of each individual defendant. The court will consider such factors as the seriousness of the offense, the defendant's criminal record, and whether or not the defendant is a flight risk.
Bail may be posted directly with the court clerk or law enforcement agency having custody of the defendant, or a bail bondsman may be used. In general, a bail bondsman will require a fee of 10% of the amount of the bail. This fee belongs to the bail bondsman; you will not get it refunded. The bail bondsman will also require collateral to secure the bond.