Do you ever wonder why the Earth isn't the center of the solar system?
It's because the order and arrangement of the planets and other bodies in our solar system is due to the way the solar system formed. Nearest to the Sun, only rocky material could withstand the heat when the solar system was young. For this reason, the first four planets – Mercury, Venus, Earth, and Mars – are terrestrial planets.
The sun's gravity pulls the planet toward the sun, This keeps the planet moving in an orbit around the sun. Because of the sun's gravitational pull, all the planets in our solar system orbit around it.
Every object in space exerts a gravitational pull on every other, and so gravity influences the paths taken by everything traveling through space. It is the glue that holds together entire galaxies. It keeps planets in orbit. ... It can also cause life-destroying asteroids to crash into planets.