The Solar System formed from a large rotating cloud of gas and dust called a solar nebula. As the nebula condensed due to gravity, a central mass became the Sun and the remaining material formed rings that eventually became the planets. The Sun consists of an inner core where nuclear fusion occurs and surrounding layers including the photosphere, chromosphere, and corona. The eight major planets can be divided into terrestrial and Jovian planets. Smaller bodies like asteroids and comets also orbit the Sun.