I refer you to the work of Prof Richard Murphy. It works like this, governments with fiat currencies create money and then spend it in the economy, they get it back via taxes. The taxes don't pay for anything, the money creation does.
BTW under this understanding deficits for fiat governments are good because they represent money out there in the economy. Governments who balance the books or run a surplus are bad because that represents govt taking money out of the economy.
Which is part of why Norway squirrels its oil money away in its Sovereign Wealth Fund with strict rules around what the income from it can be used for and the Norwegian govt runs a sensible deficit.
Most people's understandings of tax stem from the days of the gold standard and monetary control and they no longer apply under a fiat currency.
This does not mean govts can just create lots of money with no consequences. The UK govt's quantitative easing dropped the value of the pound significantly. Since they had nothing to turn around the UK's large current account deficit this fuelled inflation as imports cost more which was not countered by greater export earnings as the economy was depressed by witless austerity.
Interest rates are so low those buying gilts for security are effectively paying HMG for the privilege. When such situations pertain you borrow to invest to boost the economy. Instead we have austerity.