Why do the planets and other objects in the solar system stay in their orbits?

The planets and other objects in the solar system stay in their orbits due to the mutual gravitational attraction between each orbiting object and the Sun.