How are the planets of the Solar System formed?

The planets of the Solar System are believed to have formed approximately 4.6 billion years ago from a spinning disk of gas and dust known as the solar nebula. Here is a step-by-step process of planet formation:

1. Nebula Formation: A nebula, which is essentially a large cloud of gas and dust, forms in space due to gravitational collapse or supernova explosions.

2. Nebula Contraction: The nebula begins to contract under the influence of gravity. As it collapses, it starts to rotate faster due to conservation of angular momentum.

3. Formation of the Protostar: At the center of the collapsing nebula, a dense and hot region called a protostar forms. This protostar will eventually become the Sun.

4. Protoplanetary Disk Formation: As the protostar forms, a rotating disk of gas and dust starts to surround it. This rotating disk is called a protoplanetary disk or an accretion disk.

5. Planetesimal Formation: Within the protoplanetary disk, small dust particles collide and stick together, forming larger objects called planetesimals. These planetesimals can range in size from a few meters to several kilometers in diameter.

6. Planetary Accretion: The planetesimals continue to collide and merge, growing larger in size and forming protoplanets. This process, known as accretion, occurs over millions of years.

7. Planetary Differentiation: The protoplanets become large enough to have sufficient gravitational pull to differentiate. Differentiation refers to the separation of materials in the protoplanet, with denser materials like iron sinking to the core and lighter materials forming the outer layers.

8. Clearing of the Protoplanetary Disk: As the protoplanets continue to grow and sweep up the remaining debris in their orbits, they start to clear their vicinity within the protoplanetary disk. This process leads to the formation of a relatively clear gap called a gap or a planet's orbital region.

9. Final Planet Formation: Over millions of years, the protoplanets continue to grow, attracting more and more materials until they reach a stable size and become fully formed planets.

This is a simplified explanation of planet formation and the exact details may vary depending on specific conditions and individual planets.