The earth goes around the sun with a fixed time period due to the gravitational force of attraction between them.
Here the force of gravity (Fg) on earth is the restoring force.