Banks traditionally took your money and protected it from theft. You were charged a fee to protect the money.
They started loaning out the money for mortgages, personal loans and small business loans to make more money. They rewarded savings holders for letting them use their money to do this by paying interest.
Investment banking has two variations. One is where people put money into savings accounts where they know this is done with the money in return for higher interest rates.
During the 2007-2008 economic crash, we found out banks were investing in stocks, businesses and whole new classes of securities like CDOs and tranches of mortgage backed securities (paper not backed by the mortgages/houses). That is why when the number of people paying their high risk home loans went above a certain level and insurance on those mortgage securities came due, and the investors couldn't foreclose on homes to get their money back, the stock market fell. And insurance companies that held those investments suddenly didn't officially own enough assets to pay obligations, just as need for it was rising from financial losses. That's why the government had to bail out major investment firms and insurers.