HMRC uses a software call “Connect” which pulls together information about us all to help HMRC target its enquiries at people they think are not paying enough tax.
Banks and Building Societies report interest earned to HMRC which they will then match up with your tax return to check that everything has been declared.
As tax is no longer deducted from interest paid by banks, if you earn interest in excess of your personal savings allowance (£1,000 for a basic rate taxpayer or £500 for a higher rate tax payer), then additional tax could be due.
If you have savings in an ISA, the system can check that you have not exceeded your annual ISA allowance each year.
So to summarise, HMRC use information provided to them directly by banks and building societies about any savings interest income you receive. They may use this to send you a bill at the end of the tax year or they could amend your tax code.
This is only be for accounts in the name of one individual. Where an account is in joint names, HMRC will not have any information they can use. So, if you have received interest on a joint account, you will need to tell HMRC separately.