Our solar system is part of the Milky Way galaxy, a spiral galaxy with a diameter of about 100,000 light years containing about 200 billion stars. The solar system comprises our Sun and the retinue of celestial objects gravitationally bound to it. Traditionally, this is said to consist of the Sun, nine planets and their 158 currently known moons; however, a large number of other objects, including asteroids, meteoroids, planetoids, comets, and interplanetary dust, orbit the Sun as well. The Sun is a main sequence G2 star that contains 99.86% of the system's known mass. The point at which solar system ends and interstellar space begins is not precisely defined, since its outer boundaries are delineated by two separate forces: the solar wind and the Sun's gravity.
The current hypothesis of solar system formation is the nebular hypothesis, first proposed in 1755 by Immanuel Kant and independently formulated by Pierre-Simon Laplace. It states the solar system was formed from a gaseous cloud called the solar nebula. It had a diameter of 100 AU and was 2-3 times the mass of the Sun. Over time, a disturbance, possibly a nearby supernova, sent shock waves into space, which squeezed the nebula, pushing more and more of its matter inward until gravitational forces overcame its internal gas pressure and it began to collapse. As the nebula collapsed, it decreased in size, which in turn caused it to spin faster to conserve angular momentum. And as the competing forces associated with gravity, gas pressure, magnetic fields, and rotation acted on it, the contracting nebula began to flatten into a spinning pancake shape with a bulge at the center.
When the nebula further condensed, a protostar was formed in the middle. This system was heated by friction of the rocks colliding into each other. Lighter elements such as hydrogen and helium evaporated out of the centre and migrated to the disc's edges, thus concentrating heavier elements to form dust and rocks in the centre. These heavier elements clumped together to form planetesimals and protoplanets. In the outer regions of this solar nebula, ice and volatile gases were able to survive, and as a result, inner planets are rocky and the massive outer planets captured large amounts of lighter gases, such as hydrogen and helium.
After 100 million years, the pressures and densities of hydrogen in the centre of the collapsed nebula became great enough for the protosun to sustain thermonuclear fusion reactions. As a result of this, hydrogen was converted to helium, and a great amount of heat was released.
During that time, the protostar turned into the Sun and the protoplanets and planetesimals were transformed into planets. All of the planets formed in a relatively short time of a few million years.
Scientists estimate that the solar system is 4.6 billion years old. To calculate this figure, they examine an unstable element, which is subject to radioactive decay. By observing how much this element has decayed, they can calculate how old this element is. The oldest rocks on earth are approximately 3.9 billion years old, however it is hard to find these rocks as the earth has been thoroughly resurfaced. To estimate the age of the solar system, scientists must find rocks from space, such as meteorites – which are formed during the early condensation of the solar nebula. The oldest meteorite was found to have an age of 4.6 billion years, hence the solar system must be at least 4.6 billion years old.