The simplest way to explain a surety bond is that it is a form of credit and not insurance. A surety bond is a guarantee and what it guarantees depends on the stipulations of the bond.
Generally, a surety is an agreement between three legal entities: You (known as the principal), the party (that needs the surety bond; normally, the government) also known as the obligee, and the surety bond company that represents insurance companies having surety bond products.
The principal gets a surety bond from his insurance company that has a list of surety bond companies. To get a surety bond, the principal must have assets worth up to the amount of credit he is asking for from the surety bond company. These instruments are really temporary credit; until, a job is completed.
If the job is contracted for 1 million dollars, the principal needs to find a surety bond company to give him credit up to 1 million dollars. How much he pays that surety bond company depends on his reputation in the work that he is bidding, his assets and how much cash he actually has been on hand. Like any credit, the more money has been available, the more credit you can qualify for.