As soon as you buy a house you should let the tax office know your new address. You can then apply for tax relief on the mortgage.
Tax relief covers a house, flat and in some cases a mobile home. It's also worth noting that you can claim tax relief on any loan used to purchase or repair a property so long as it ... is where you are living. This doesn't apply to second homes or investment properties.
If you decide to rent out the property, then you will no longer be entitled to tax relief as it is no longer where you live. If you become unemployed you are still entitled to mortgage interest relief. This is called the "Tax relief at source". If the property is an investment property and you decide to sell it on, then you will have to pay Capital Gains Tax (CGT) on any gain you make (if any) on the sale. However, if you have been living in the property, then you don't have to pay CGT.