Birth of a star
Astronomers believe that molecular clouds, dense clouds of gas located primarily in the spiral arms of galaxies are the birthplace of stars. Dense regions in the clouds collapse and form “protostars”. Initially, the gravitational energy of the collapsing star is the source of its energy. Once the star contracts enough that its central core can burn hydrogen to helium, it becomes a “main sequence” star.
Death of a star
After a low mass star like the Sun exhausts the supply of hydrogen in its core, there is no longer any source of heat to support the core against gravity. Hydrogen burning continues in a shell around the core and the star evolves into a red giant. When the Sun becomes a red giant, its atmosphere will envelope the Earth and our planet will be consumed in a fiery death.
Meanwhile, the core of the star collapses under gravity’s pull until it reaches a high enough density to start burning helium to carbon. The helium burning phase will last about 100 million years, until the helium is exhausted in the core and the star becomes a red supergiant. At this stage, the Sun will have an outer envelope extending out towards Jupiter. During this brief phase of its existence, which lasts only a few tens of thousands of years, the Sun will lose mass in a powerful wind.
Eventually, the Sun will lose all of the mass in its envelope and leave behind a hot core of carbon embedded in a nebula of expelled gas. Radiation from this hot core will ionize the nebula, producing a striking “planetary nebula”, much like the nebulae seen around the remnants of other stars. The carbon core will eventually cool and become a white dwarf, the dense dim remnant of a once bright star.