When you take out a loan, you receive cash. That cash increases your assets, while the loan increases your liabilities (such that your equity does not change - until you have to pay interest.).
(Though, notably, for a bank the client deposits are liabilities, and the loans to clients are assets, indeed.)