The solar system consists of the Sun and everything that orbits it, including 8 planets, their moons, asteroids, comets, and other small celestial objects. The inner planets closest to the Sun are Mercury, Venus, Earth, and Mars. The outer planets farther from the Sun are gas giants Jupiter, Saturn, Uranus, and Neptune. Smaller objects like asteroids and comets also orbit the Sun.