The basic reason why the planets revolve around the Sun, or orbit it, is related to the Sun’s gravity, which keeps them in their orbits.
Just as the Moon orbits the Earth due to the Earth’s gravitational pull, the Earth orbits the Sun due to the Sun’s gravitational pull.
Then why does it move in an elliptical orbit around the Sun instead of being pulled all the way around?
This happens because the Earth has a velocity in the direction perpendicular to the Sun’s gravitational force. If the Sun did not exist, the Earth would move in a straight line.
But the Sun’s gravity alters its course, causing it to move around the Sun in a shape very close to a circle.
The Sun’s gravity keeps the planets in their orbits
To make it easier to visualize, imagine Superman standing on Mount Everest and holding a soccer ball.
He throws it as hard as he can, and eventually it will fall and hit the ground. But because he threw it so hard, the ball goes over the horizon before falling.
And because the Earth is curved, the ball continues to move, constantly “falling” but not touching the ground, because our planet curves before the ball falls, writes Curious Astro.
Eventually, the soccer ball will come back and hit Superman, which of course won’t hurt him at all, because he’s Superman.
How did the Earth get its rotational speed?
That’s how orbits work, but objects like spaceships and moons are much further from Earth than the football that Superman threw.
The same situation can be applied to the Earth orbiting the Sun
The next question, then, is how the Earth got that speed, since in real life there is no Superman to throw it.
For that, we have to go way back, to the time of the formation of the Solar System.