How do banks generate revenue?

The primary way is through lending money to their customers. A second way would be to issue bonds. A third way would be to sell stock