Why does a ball bounce?

Squished rubber or air stores energy when you drop the ball, then springs back to push it up.