This may seem like a stupid question, but you'd be surprised to know how many people have no idea why is Earth round. The simple answer would be – gravity, but then you can ask yourself why aren't asteroids round but rather potato-shaped?
Before our planet began forming, in its place there was nothing but a cloud of gas and dust from which our solar system and its planets formed. This cloud resembled a disk and the disk rotated. Small pieces of dust and gas began sticking together because of electrostatic forces. Imagine a plastic rod becoming negatively charged after being rubbed with a dry cloth. As grains of dust collided with one another, some became negatively and some positively charged, making them stick together, forming small rocks.
As these rocks moved through the dust cloud around the Sun, they became mountains. As these mountains became even larger bodies, one kilometer and larger, the gravity started to take over, attracting even more material. After these planetesimals, as they are called, reached 800 kilometers, the pressure inside became so strong, it melted rocks and made the whole planetesimal hot and fluid enough to be rearranged. Since the gravity affects the material equally in all directions, the now melted rocks formed a sphere.
Earth, however, is not a perfect sphere. It is flattened along the axis from pole to pole and has a bulge around the equator. Because it rotates around its axis, centrifugal force made sure more of the material ended up around equator than around poles. This is why its diameter at equator is 43 kilometers larger than diameter from pole to pole.
Another reason our home is not a perfect sphere is because it has mountains and canyons, but these are relatively small compared to the size of the planet.