Interest only mortgages require you to make monthly payments to the mortgage lender to pay off the interest on the amount borrowed. In addition to the interest only mortgage you need to set up a separate provision which would repay the balance at the end of an agreed term.
Therefore the mortgage balance remains the same as when it was originally taken out, for example if you borrowed £100,000 for 25 years under an interest only arrangement then after the 25 years £100,000 will still be outstanding, provided all payments are up to date.
It should be noted that with any investment related repayment vehicle, investments can go down as well as up and you may not get back the full amount invested. There is also no guarantee that the investment taken out will be sufficient at the end of the mortgage term to repay the mortgage. It is your responsibility to ensure you have sufficient funds to pay the mortgage off.