How investment banks generate revenue?

By advisory fees on activities such as acquisitions, by commissions on activities such as IPOs, market making bid/ask spreads, and through trading their own money on the financial markets (proprietary trading).