There are two types of mortgage, interest only or capital repayment. With an interest only mortgage the balance of your mortgage stays the same throughout the mortgage term.
Interest and sometimes a premium in a suitable investment vehicle are paid monthly. At the end of the term, the proceeds from the investment vehicle are intended to repay the mortgage. This amount will depend on the performance of the investment vehicle.
If you do choose an interest only mortgage you are responsible for ensuring that you have sufficient funds available to repay your mortgage at the end of the term.