Look up Fractional Reserve Banking
Plenty more explanations out there if you want more detail.
In very simple terms, when you deposit money into banks they don't have to keep a pot of it there ready for you to withdraw or to lend to others, they only have to keep a %, or fraction of it, and can "create" more off the back of it to lend out.
EG: for every £1,000 the banking system has, they can create (out of thin air) another £9,000 off that collateral to loan out.
Then the opposite also happens, when a loan gets paid back (out of the 'created' money) it doesn't sit in the bank, it just cancels out the original loan, so that money doesn't exist anymore and the only part left is the interest they charged on that loan.
So in a very simple cycle : Bank gets £1,000 deposit it puts in its vault. It then creates £9,000 of 1 year loans off the back of that £1,000 and charges 10% interest. There is now £10,000 total in the banking system. After 1 year all the loans are repaid and the bank now has £1,900 in its vault, the £1,000 initial deposit and £900 interest. The £9,000 that was created into the system with the loans is then removed as the loans were repaid.
Obviously macro economics is far far more complicated in the real world, but that's the nub of it.