How does mortgage insurance work? Is it like home or auto insurance?

Like home or auto insurance, mortgage insurance requires payment of a premium, is for protection against loss, and is used in the event of an emergency. If a borrower can't repay an insured mortgage loan as agreed, the lender may foreclose on the property and file a claim with the mortgage insurer for some or most of the total losses.