Why do planets revolve around a star and not smash into them due to gravity?

Planets revolve around the sun due to its gravity, but why do they revolve, why dont they run into the sun?
11 answers 11