Planet formation is the process by which a planet forms and grows from a protoplanetary accretion disc. This article will focus on the formation of planets around stars, but the same basic principles apply to the formation of moons and planetary systems around giant planets.
In the early stages of star formation, a molecular cloud collapses under its own gravity to form a protostar. As the protostar contracts, it spins faster and flattens into a disk-like shape. The infalling material continues to fall onto this disk and slowly builds up mass. At the same time, dust particles in the disk collide and stick together, gradually growing into larger bodies known as planetesimals. These planetesimals are thought to be the building blocks of planets.
As more dust and gas is accreted onto the protoplanetary disk, it begins to heat up due to friction and compression. At some point, this heating triggers nuclear fusion in the core of the star, which marks the beginning of its main-sequence lifetime. The resulting light from the star blows away much of the remaining infalling material and disperses most of the remaining dust in