Miranda, a moon of Uranus
Some scientists believe that the moon was shattered by an impact from an asteroid, meteorite or comet. However, the fragments that had broken off may have been attracted back to what was left of the moon by its gravitational pull. This is similar to how the planets and moons originally formed billions of years ago, as clumps of matter (rocks, ice, gas particles) were attracted to other larger clumps of matter by gravity. Larger clumps had stronger gravitational pulls, and the planets and moons that formed from them became spheres. Smaller clumps of matter didn't attract as many amounts of matter, so became irregularly-shaped. These irregularly-shaped rocks orbiting the Sun became known as asteroids, or minor planets. The irregularly-shaped rocks orbiting planets are still known as moons, even though they aren't all round.