Whatever money a bank stores from its customers is usually invested in order to generate some revenue for the banking institution. Additionally, banks (much like credit card companies) depend on their customers to spend a lot of money in hopes that payments cannot be made in full. The bank then makes money in the form of interest (or any kind of late fees, etc). This money is too invested.
They rent your money by paying a small interest rate; which is incentive to keep your money in the bank.
They take the money that they rented from you and rent (loan) it out to somebody else. The interest that they charge is higher than the interest that you get.
i.e., they pay you 1% for your money and charge 5% for a housing loan.