There is generally no need for an unrelated person to take over a mortgage. They simply take out a new mortgage to buy the house and the old mortgage is paid off by the seller.
In Ireland there are no penalties if a borrower wants to repay a mortgage early and most of our mortgages are variable rate mortgages. In other countries, it might make sense to take over a mortgage if the rate was fixed.
I presume that in countries like Switzerland, where the mortgage is attached to the property, the lender would have to approve the buyer of the house.
Where joint owners want to separate in Ireland, either can take out a new mortgage with another institution to redeem the joint mortgage. However, I think that the lenders are a bit more flexible with their limits to facilitate the separation. In particular, they will sometimes allow a tracker mortgage to be kept.