In more detail
The formula is A = P(1 + r/n)^(nt). Over long periods the effect is large, which rewards starting to save early and punishes carrying high-interest debt. The APY captures it as a single yearly figure. See How Compound Interest Works.
Example
$10,000 at 5% for 10 years grows to $16,288.95 with yearly compounding, against $15,000 with simple interest.