Before looking at how a star collapses to become a black hole, let’s look at its life. Stars are formed inside vast clouds of gas and dust to drift together to form clumps called protostars. Each protostar shrinks until its center becomes so dense that nuclear reactions begin inside it, and it starts to shine. The Orion nebula, a huge cloud of gas and dust is lit by the light of nearby stars. Stars come in different sizes. The Sun is a pretty average star, which glows yellow. Larger stars glow blue or white because they are hotter, but they don’t shine for as long. Smaller stars glow Orange or red. They are cooler and last longer.
After thousands of millions of years, the nuclear reactions in the sun will stop. Gravity will then squeeze the core, creating heat that will make the outer layers swell, swallowing Earth. The outer layers will drift into space, leaving a planet-sized star called a White dwarf.