The Earth is not a perfect sphere. It's poles are flattened and its equator bulges outwards. This is due to centrifugal force as the planet spins on its axis. However, setting this fact aside for a moment, Earth is spherical in shape because its gravity is pulling everything towards the center of the planet. This pull is spread equally across its entire surface. Because all of this mass cannot share the same space, gravity forces it into the most efficient configuration, which is a sphere. Any object of sufficient mass will over time become spherical in shape.
|