Commercial bank: accepts deposits from customers (retail depositors, commercial depositors etc. and makes consumer and commercial loans using these deposits. It may also offer anciliary services like credit cards
Investment bank: acts as an intermediary between companies and investors. Does not accept deposits, but rather sells investments, advises on M&A, etc. Loans and debt/equity issues originated by the bank are not typically held by the bank, but rather sold to third parties on the buy side through their sales and trading arms.
In fact, it may be more sensible to call investment banks as investment brokers. They are essentially like a real estate broker that connects 2 parties and convinces them to go ahead with a deal in exchange for a commission
