The Solar System consists of the Sun and planets that orbit it. A planet is a large celestial body that orbits a star. The planets formed around 5 billion years ago from dust and gases swirling around the young Sun. Earth formed as dust and gases collided in the heat and hardened into a ball of rock. Planets orbit the Sun due to the Sun's strong gravitational pull. Earth's distance from the Sun of 150 million kilometers means water can exist as a liquid, allowing life to develop.