The word bail as a legal term means:
Security, usually a sum of money, exchanged for the release of an arrested person as a guarantee of that person's appearance for trial.
As a verb: to secure the release of an arrested person by providing bail.
Release from imprisonment on payment of such money.
As a verb: to release a person under such guarantee.
The person providing such payment.
Traditionally, bail is some form of property deposited or pledged to a court in order to persuade it to release a suspect from jail, on the understanding that the suspect will return for trial or forfeit the bail ("skipping bail", or "jumping bail", is also illegal). In most cases bail money will be returned at the end of the trial, if all court appearances are made, no matter whether the person is found guilty or not guilty of the crime accused. In some countries, including the US, granting bail is common. Even in such countries, however, bail may not be offered by some courts under some circumstances; for instance, if the accused is considered likely not to appear for trial regardless of bail. Countries without bail imprison the suspect before the trial only if deemed necessary.
In finance, a bond is a debt security, in which the issuer owes the holders a debt and is obliged to repay the principal and interest (the coupon) at a later date, termed maturity. Other stipulations may also be attached to the bond issue, such as the obligation for the issuer to provide certain information to the bond holder, or limitations on the behavior of the issuer. Bonds are generally issued for a fixed term (the maturity) longer than one year.
A bond is just a loan, but in the form of a security, although terminology used is rather different. The issuer is equivalent to the borrower, the bond holder to the lender, and the coupon to the interest. Bonds enable the issuer to finance long-term investments with external funds.