If the government backs your home purchase with a FHA or USDA loan, the required downpayment is much lower than with a conventional loan. The mortgage insurance protects the lender in case you default on the loan. The mortgage company will get a portion of your principal if you stop making payments. However, you will still be responsible for the loan and the home can go into foreclosure if you fall too far behind on your payments.
Mortgage insurance will also be needed if you pay less than 20% down on a conventional loan. There may come a time when you have paid enough into your mortgage to get rid of the mortgage insurance; for this you will want to check with your bank.