Given the issuer-pay model, there is an ever-present concern that rating agencies have an incentive to understate the risks and provide ratings that are too high.
In exchange for an upfront fee, a bond insurer would take a bond with a midling investment grade rating -- single-A, for example -- and offer to pay investors what they were due if the issuer defaulted.
Once a municipal bond is refinanced, (prerefunded) the issuer uses the proceeds of the new issue and purchases US Treasury securities (collateral) that are used to pay the interest and principal on the original, more expensive debt until maturity or the call date, whichever the escrow agreement states.