There are two ways to repay the money you have borrowed - on an interest-only or a repayment basis.
With an interest-only mortgage, you'll only pay the interest on your loan amount each month. At the end of the mortgage term - usually 25 years - you'll still owe the capital, which is the amount you initially borrowed, so you'll need to have a plan in place to pay this off at the end of the term.
With a repayment mortgage, each monthly repayment pays off part of the capital as well as the interest, so your mortgage will be repaid in full at the end, as long as you keep up the repayments.
The monthly payments for a repayment mortgage are higher than for an interest-only mortgage, but this doesn't mean that interest-only is a cheaper option or that it'll help you afford a bigger mortgage. You'll also need to have a way of paying back the capital, so this needs to be taken into account when you work out what you can afford.
You can repay your mortgage over a term that suits you - from 1 to 40 years - although we only usually consider a mortgage term that ends before you reach 75. If your loan carries an early repayment charge, you won't be able to choose a term that finishes before the early repayment charge period.