Interest on interest
With simple interest you earn only on the amount you started with. With compound interest, each period's interest is added to the balance, so the next period earns interest on a bigger amount. The growth is slow at first and then speeds up, which is why long time frames matter so much.
The three levers
Three things drive the result: the rate, the time and the amount you add. Time is the lever most people underuse. Starting ten years earlier can matter more than a higher rate, because the early money has longer to build on itself. Regular contributions add fresh money that also starts compounding.
Compounding frequency
Interest can compound yearly, monthly or daily. More frequent compounding gives slightly more growth at the same stated rate, but the difference is small compared with the effect of the rate and the time. Annual percentage yield, or APY, already includes compounding, so it is the fair way to compare accounts.
Compounding works against debt too
The same effect makes credit card debt grow when only small payments are made. Interest is added to the balance and then charged interest itself. That is why paying more than the minimum matters.