Dear Ricky Mee
The sun and planets came from a big blob of dust and gas left over from at least one supernova (star explosion) more than five billion years ago.
All those little bits kept bumping into each other and sticking together (through gravity) to make bigger lumps. This kept happening till some of the lumps were big enough to be the sun or planets or moons or comets.
Because the whole system would have been rotating (spinning) right from the start then all its parts would rotate, too.
(Of course, why the whole system was rotating is another question.)
Huge things that spin and are held together by gravity usually form spheres. Parts of them that stick out too far will collapse and holes that are too big will cave in. So the end result is a sphere.
The bigger the object, the more powerfully its gravity holds it in a smooth spherical shape. The smaller it is, the less this happens. For instance, craters and mountains on Mars and the moon are relatively bigger than those on the Earth.
But Mars and the moon still look exactly as round as the Earth.
The moon was formed from material blown out of the early Earth by a huge impact. Eventually the cloud of junk that spread around the Earth clumped together to form the moon. It was a big clump, and it was rotating--so it had to be round.