At first glance “bail,” “bailiff” and “bailment” would appear to be related terms, but actually they’re not!
“Bail” is perhaps the most easily recognizable of the three, being the English term for the fianza given by a criminal defendant to elude pretrial detention and be “released on bail” (salir en libertad con fianza*) while awaiting trial. In English we say that a judge “grants bail” (acuerda la libertad con fianza) and “fixes (or) sets bail” (fija la fianza), while the accused “posts bail (or) a bail bond” (presta fianza), and is thus granted “pretrial release” (libertad provisional). When bail is posted by a third party, a less formal expression is “to bail (someone) out of jail” is often used. Failure to comply with the terms of pretrial release is known variously as “jumping (or) skipping bail” (violar/quebrantar las condiciones de la libertad con fianza), which may result in forfeiture of the amount posted.
Bail’s look-alike “bailiff” denotes a court officer, generally in charge of maintaining order during court proceedings, but who may have other duties (depending on the jurisdiction), such as assisting a sheriff, serving process and executing court orders. Bailiffs also act as court criers, announcing the judge’s entrance in the courtroom (the famous “Oyez, oyez, oyez!” explained here). “Bailiff” is often rendered in Spanish as alguacil, a term that isn’t used in Spain where a court officer known as auxilio judicial keeps order in the courtroom when a judge requests him to do so (guarda la Sala bajo las órdenes del Juez).
And, finally, “bailment” is likewise totally unrelated to the previous two, being the English term for the Spanish contrato de depósito. The fact that these are kindred concepts is evidenced in a simple comparison of their definitions: Black’s Law Dictionary defines “bailment” as “delivery of personal property by one person (the bailor) to another (the bailee) who holds the property for a certain purpose under an express or implied-in-fact contract.” Similarly, as defined in the Spanish Civil Code, under a contrato de depósito, el depositante entrega una cosa mueble al depositario para su custodia y posterior restitución al depositante (a bailor delivers an item of personal property to a bailee for its safekeeping and subsequent return to the bailor).
*The expression that is perhaps most often seen is libertad BAJO fianza, although the term actually used in the Spanish Ley de Enjuiciamiento Criminal is libertad provisional CON fianza (arts. 505 and 539).