Simply put, the planets are round or spherical in shape because of the gravitational force acting upon them and their rotations around their axes.
One theory as to how the universe came into existence is the Big Bang theory. The Big Bang theory suggests that a small, dense core of matter exploded about 12 million years ago. All celestial bodies were formed from the debris ejected by this dense package of matter.
Gravity played a huge role in creating the Solar System. The force of gravity is accredited with gathering the debris ejected by the Big Bang. Gravity drew clumps of dust and gas together. The speed and friction of the colliding particles within the clumps caused the particles to become hot. Eventually, the clumps became molten-like. Eventually, the matter within the clumps cooled and formed into the planets of today.
The planets became spherical because gravity pulled the molten clumps in towards their centers. However, planets are not perfectly round. They tend to bulge at their centers. This is because, as they are pulled inward by the force of gravity, the planets also rotate on their axes. The spinning of the planets’ rotations act as an opposing force to the force of gravity, which causes the centers of the planets to bulge.