How do investments earn money?
Different kinds of investments generate money in different ways. Underlining every investment decision should be the calculated assumption that the asset invested in will become more valuable over time. In other words, it should appreciate in value.
Certain company stocks also generate a passive income by appreciating in value and earning a shareholder dividend, a sum of money paid to shareholders on a regular basis as a thank you of sorts for holding company shares.
Money of yours in a bank account is essentially on loan to the bank for which you are paid in interest as a relatively small annual percentage. Generally, any investment that you borrow money generates interest, including bonds.