Here's a breakdown:
* The Sun's Birth: The solar system began as a giant cloud of gas and dust called a nebula. Gravity caused this nebula to collapse, eventually forming our Sun.
* The Disk: The remaining material orbiting the young Sun flattened into a spinning disk known as a protoplanetary disk. This disk contained a mix of dust grains, ice, and gas.
* Accretion: Over millions of years, tiny dust particles in the disk stuck together due to electrostatic forces and gravity. These small clumps grew larger and larger, eventually becoming planetesimals.
* Planetesimals to Planets: Through continued collisions and gravitational attraction, planetesimals eventually merged to form the planets we know today.
The inner planets, being closer to the Sun, experienced:
* Higher temperatures: This led to the vaporization of most volatile materials like water and methane, leaving behind heavier elements like iron and rock.
* Stronger solar radiation: This further contributed to the loss of lighter elements.
This explains why the inner planets are predominantly rocky, while the outer planets are gas giants.