Understanding the shape of the Earth is all about its mass, says Bill Nye the Science Guy. If it weren't for all the water, rocks, metals, and lava on our planet, it might have an irregular form.
As Earth rotates around the sun, its irregularities are smoothed out by the larger body's gravity. The same is true for all the planets, though Pluto has just enough mass to be spherical — despite famously no longer being classified a planet.
Asteroids are an example of bodies without enough mass to have their shape affected by the sun's gravity. They are made of many elements found on Earth, but not in enough quantities to be rounded by gravitational forces.
For those interested, Bill Nye describes an experiment with marbles and rubber bands that simulates how gravity affects massive bodies. And for some reading material, check out Nye's book, Unstoppable:Harnessing Science to Change the World.