Mortgage insurance (MI) is a policy that protects the lender — not you — if you stop making mortgage payments. It is typically required when your down payment is less than 20% of the home's purchase price, because a smaller down payment means more risk for the bank.
In the US, private mortgage insurance (PMI) costs between 0.5% to 1.5% of the loan amount annually. On a $300,000 mortgage, that is $1,500-$4,500 per year added to your monthly payments. Government-backed loans (FHA, VA) have their own mortgage insurance programs with different rules.
The good news: once your home equity reaches 20% (or 78% loan-to-value ratio), you can request cancellation of PMI on conventional loans. FHA mortgage insurance, however, often lasts for the life of the loan. Mortgage insurance made homeownership possible for millions who cannot afford a large down payment.