The Solar System is composed of the Sun, the eight planets and their moons, dwarf planets, asteroids, comets, and other small bodies. All of these objects are held together by the force of gravity, which is the force of attraction between any two objects with mass. The Sun is the most massive object in the Solar System and has the strongest gravitational pull. This pull is what keeps the planets and other objects in their orbits around the Sun. The force of gravity depends on the mass of the two objects, and decreases with distance, so the farther away an object is from the Sun, the less gravity it experiences.