* The Solar Nebula: Our solar system began as a giant cloud of gas and dust called a solar nebula. This cloud was mostly hydrogen and helium, but it also contained heavier elements like carbon, oxygen, nitrogen, and iron.
* Gravitational Collapse: The solar nebula began to collapse under its own gravity. As it collapsed, it spun faster and faster, like a skater pulling their arms in.
* Sun Formation: The vast majority of the material in the nebula collapsed into the center, forming the Sun. The immense pressure and heat in the core ignited nuclear fusion, the process that makes stars shine.
* Planetesimal Formation: The remaining material in the nebula, now orbiting the young Sun, began to clump together due to gravity. These small clumps, called planetesimals, were the building blocks of planets.
* Planetary Accretion: Over millions of years, planetesimals collided and stuck together, growing larger and larger. This process is called accretion.
* Planetary Differentiation: As planets grew, their interiors heated up due to the energy released by collisions and radioactive decay. This heat caused the heavier elements to sink to the center, forming a core. Lighter elements rose to the surface, forming a crust and atmosphere.
So, while the planets are made from the same material as the Sun, they are not directly leftover parts of the Sun. They were formed from the leftover material in the solar nebula *after* the Sun formed.