Here's how I learned it. Start from the basic fact that, every year, there is a certain probability that you will die. An insurance company takes on huge numbers of customers and does some of the fanciest statistics to calculate how much they have to charge in premiums so that they can pay out the guaranteed benefits for those that die, and still have money left over for costs and a profit margin.
Term life insurance is the basic stuff, and is subdivides into two groups quickly. For Level Term, the guaranteed benefit is fixed ("level"); so, as you get older and your risk of dieing increases, they charge you a higher yearly premium. These are always written to end at a particular time. If you are still alive when the contract ends, the insurance company owes you nothing.
For Decreasing Term, the yearly premiums are fixed and the changes in risk are covered because the benefit to pay out decreases each year. Same deal as above when the contract period runs out.
Some companies offer twists on these - a compromise deal with slowly increasing premiums and slowly decreasing benefits, for example. Or maybe a deal that, after a 25-year contract, there is a fixed small benefit to be paid out when you die, but no further premiums. Various deals possible.
Whole Life is a combination for Decreasing Term insurance and an investment fund. You never see the details - that's all done by the insurance company. Basically they collect from you a premium which is higher than the "normal" Decreasing Term insurance. They use part of that to cover the term insurance commitment, and put the extra into an investment fund they manage. As you get older the value of the Decreasing Term part goes down, but the accumulated value of the investment fund goes up, and the company always has enough money in total to pay out the guaranteed benefit when you die. Many of these have a "paid up policy" provision. After many years of operation the investment fund part completely covers the anticipated payout, and there is no more need for the term insurance part. Moroever, since the investment fund is already big enough, they don't need to collect more premiums - they can just keep managing the fund until you die, then pay out the death benefit and keep any excess.
Term insurance is definitely cheaper, because that's all you are buying - insurance. But if you make that choice, you MUST also have some discipline and commitment to invest more money yourself somehow, so that many years later you have extra money. If you can't do that or don't know how, Whole Life is one solution. Not the best, mind you - as an investment fund, those things generally pay poor interest rates, but it's better than zero.
Now, for your immediate interest, the best thing to protect a mortgage is Decreasing Term. You pay the same premium every year (or month) and the payout value of the insurance just nicely matches the decreasing remaining balance on the mortgage. You set it up so the insurance ends when the mortgage is paid off and then you pay no more. In fact, many mortgage companies sell this insurance themselves. Some make it available as a separate option; some make it mandatory in the deal. Your decisions are two: do we need insurance to protect us by paying off the mortgage when one of us suddenly dies, reducing family income? And if yes, then is the mortgage company's premium rate as good as we could get from an independent insurance company?
Don't forget, you can always buy several types of insurance at the same time if you decide it's right for you. For example, many people will have automatically some form of term insurance provided by their employer as part of the benefits package, plus Decreasing Term to cover their mortgage, and maybe some private Whole Life for a "nest egg" fund later. You have to decide what you want. And as others have said, keep reviewing it because your needs change radically with changes in family structure, health, etc.