All banks operate by discounting assets into their own liabilities. They take onto their balance sheet an asset and issue their own liabilities against it.

So a mortgage is the creation of a financial asset on the books of the bank called a 'mortgage', secured against a house, against which it creates an 'advance' - the liabilities you use to buy the actual house the mortgage is secured against. The result is the bank's balance sheet expands and that's what 'printing' or better named 'creating money' is.

The 'advance' then just keeps swapping hands in the private sector, and that's what we call 'money'. That keeps happening until somebody uses some of it to pay back a loan at which point that portion of the 'money' disappears. The bank's balance sheet shrinks and that is 'destroying money'

The government is no different. When it spends, then by default the central bank provides an overdraft loan to the Treasury department, secured on the government's ability to tax, and creates an 'advance' that it uses to pay people. The central bank's balance sheet expands and money is 'printed'

When government receives taxes that reduces the overdraft loan and the central bank's balance sheet shrinks, and money is 'destroyed'.

In a sensible world that is where it would stop. However some people don't like the idea that government spends by borrowing from the bank it usually owns, or at the very least controls, (even though that is the cheapest place government could borrow from since anything it paid in interest would come back to it as the central bank dividend) so they try to hide the fact or stop it from happening.

Usually they introduce a rule that says government can't have an overdraft. However that is normally only a rule that government can't have an overdraft overnight, so the above still applies during the day whichever currency area happen to be operating in. It would be difficult to run an efficient bank clearing system otherwise.

At which point the Treasury issues a different sort of money called a 'bond' which 'primary brokers' then take as collateral to a bank. The bank temporarily buys the bonds by creating an advance against them. That advance is transferred to the Treasury department who uses it to clear the overdraft.

The primary broker then sells the bond into the wider market and receives money in exchange which it uses to buy back the bonds from the bank so it can transfer the bonds onto the end purchaser.

QE is just the central bank buying bonds permanently using the same mechanism that the primary broker's bank used to buy bonds temporarily - issuing an advance against the bonds which then 'creates money'.

In reality it is nothing more than an asset swap. Whoever had the bond as savings ends up with a newly created bank deposit as savings instead - at a lower and variable interest rate. QE is a way of changing the type of savings held in aggregate, not a way of 'issuing money' as some people still think.

QT is the opposite. The central bank sells back the bonds it owns to the market and the end purchaser ends up with a bond, not a bank deposit. The bank deposit is destroyed.

The overdraft the Treasury uses can be disguised in another way. The bond issuing and QE mechanisms above are used in tandem until the Treasury account reaches a particular positive balance. That trick is used by the TGA in the USA and the DMA in the UK to try and make it look like the government is never borrowing - even intraday. It is just a facade. Operationally it makes no difference. The central bank will never bounce a government payment instruction.

I've simplified the above as much as I can, but it is still quite involved. I hope you can follow it.