NASA states that for an astronomical body to be considered a moon, that object must orbit a planet. For a planet to be classified as such, it must meet certain strict criteria set by the International Astronomical Union.
Even though a moon orbits the sun, it also orbits a planet, which distinguishes the two from each other. Jupiter and Saturn have at least 50 moons each, while Mercury and Venus do not have any. NASA reports that Earth's moon was most likely created after a large object struck Earth and an enormous amount of debris was ejected into space, and this debris slowly formed into a ball and created the moon. The moons of other planets vary in size and shape, and Mars' only moon, Phobos, is inching closer to its host. It is expected to crash into Mars' surface or get torn apart by gravity several millions years from now.
In 2006, the IAU set the following criteria on what classifies a body as a planet: it must orbit the sun, its gravity must be strong enough to form itself into a sphere and it must have cleared its own path around the sun from other objects. Pluto was evicted from planet status after scientists agreed that it did not meet the criteria set by the IAU.