If they realise you owe say £500 they just send you a new calculation saying here's why you owe £500, we wouldn't tax X amount of your income by law, so, Y = X - £500 now we won't tax the first Y next year.
Pay As You Earn means most ordinary workers in the UK have all their income taxes collected by their employer automatically. The employer doesn't know why you pay the taxes you do, they just get told a code signifying how much to charge.
There's a cute trick to let HMRC verify that payroll accounting is legit without snooping personal bank details of people who aren't suspected of tax fraud. Basically there is a field with a blinded cryptographic signature in it in electronic payroll feeds, all the signatures should tie up to tax records without revealing who exactly was paid how much.