If a person left a house in a will with a mortgage payment what happens with the mortgage?

The mortgage has to be resolved. Either it must be sold and the mortgage paid off, or the person inheriting obtains a replacement mortgage.