There is no hard and fast answer to what will happen to your mortgage when you die as it is largely dependent on what you have set out in your mortgage agreement, your will (if you have one), other assets you may have and if you have insurance. If you have co-signed the mortgage with another person that person will become responsible for the remaining debt when you die.
If the mortgage is in your name only the house will be sold by the bank to cover the remaining debt and your nominated air will receive the remaining sum if there is a difference. If there is a turn in the market and the sale of your house won’t cover the remaining debt the case may go to court and the difference may have to be covered by the sale of other assets.
If you have a life insurance policy your family may be able to use some of the lump sum payment from this to pay down the remaining mortgage debt. Alternatively, your lender may provide some form of mortgage protection that could assist your family in making repayments following your passing.