A surety bond works like a co-signer on a loan. Someone owes a duty, someone is owed that duty, and a third party with deep pockets promises to step in if the first one fails.
Principal: the party that owes the obligation and whose performance the bond guarantees. The principal furnishes, and usually buys, the bond.
Obligee: the party the obligation is owed to. The bond protects the obligee if the principal defaults.
Surety: the party that makes the guarantee and pays the obligee if the principal fails to perform.
Example: a city hires a paving contractor and requires a bond guaranteeing the job will be finished. A surety company issues it. The contractor is the principal, the city is the obligee, and the surety company is the surety. The common mistake is to call the party that requires the bond the principal; it is the obligee. The bond does not protect the principal, who stays responsible for its own obligation.
California law: Civil Code §2787 says a surety or guarantor is one who promises to answer for the debt, default or miscarriage of another, or who pledges property as security for it. The section abolishes the distinction between sureties and guarantors, so in California statutes the two words mean the same thing.