Many other planets have moons. There are 166 natural satellites in the solar system orbiting six different planets, including Earth. Jupiter has 63 orbiting moons, followed by Saturn's 60. Uranus has 27 moons, Neptune has 13, Mars has two and Earth has one.
Early in a planet's formation, moons are formed by debris and other rocks that get caught in the gravitational pull of a planet. The gravitational pull gradually compacts the rocky matter over billions of years into one or more sphere shapes, creating moons of varying sizes.
The largest moon in the solar system is Ganymede, belonging to Jupiter. Larger than Mercury, it would be classified as a planet if it orbited the sun. The second largest moon in the solar system is Titan, belonging to Saturn. It is 50 percent larger than Earth's moon and is the only moon with a dense, Earth-like atmosphere.