Your mother just died and has a mortgage on the house do you need to pay the mortgage when you sell the house?

Of course! The money is still owed to the bank and you cannot legally sell it without satisfying the mortgage.