Formation and evolution of the Solar System
The formation and evolution of the Solar System is the name for the many ideas describing how the Solar System began and how it will carry on changing. The accepted idea is that 4.6 billion years ago, there was a very big cloud of gas in our area of space, known as a nebula. The nebula eventually became so big that gravity pulled all the gas to the center. Eventually because of all the gas it became so hot there that some hydrogen atoms fused together to make helium.
This process by which the solar systems are created is called the nebular theory. The spin of the planets around the Sun, and each around its own axis was first caused by the original gas cloud having different density in different places. The spin increased as an effect of the contraction under gravity. So did the flatness of the solar system's shape.
Gravity caused the atoms in the Sun to become very close to each other. All this energy eventually made our star: the Sun. The leftover gas mostly went to the gas giants—also known as Jovian planets. The rock and dust went off to make the terrestrial planets, their moons, asteroids and all other objects in the Solar System.
Because of the sun's huge mass (99.86% of the whole mass of the solar system), it had very strong gravity that caused all of the surrounding celestial objects to stay in orbit around the sun. The huge density of its core causes a fusion reaction which turns hydrogen into helium with the radiation of heat, light and other forms of electromagnetic radiation.
The solar system was now formed.