Until the early- to mid-twentieth century, scientists believed that stars generate energy by shrinking. As stars contracted, it was thought, they would get hotter and hotter, giving off light in the process. This could not be the primary way that stars shine, however. If it were, they would scarcely last a million years, rather than the billions of years in age that we know they are. We now know that stars are fueled by nuclear fusion. Each time fusion takes place, energy is released as a by-product. This energy, expelled into space, is what we see as starlight. The fusion process begins when two hydrogen nuclei smash together to form a particle called the deuteron (a combination of a positive proton and a neutral neutron). Deuterons readily combine with additional protons to form helium. Helium, in turn, can fuse together to form heavier elements, such as carbon. In a typical star, merger after merger takes place until significant quantities of heavy elements are built up.
We must distinguish, at this point, between two different stellar types: Population I and Population ll, the latter being much older than the former. These groups can also be distinguished by their locations. Our galaxy, the Milky Way, is shaped like a flat disk surrounding a central bulge. Whereas Population I stars are found mainly in the galactic disk, Population II stars mostly reside in the central bulge of the galaxy and in the halo surrounding this bulge.
Population II stars date to the early stages of the universe. Formed when the cosmos was filled with hydrogen and helium gases, they initially contained virtually no heavy elements. They shine until their fusible material is exhausted. When Population II stars die, their material is spread out into space. Some of this dust is eventually incorporated into newly formed Population I stars. Though Population I stars consist mostly of hydrogen and helium gas, they also contain heavy elements (heavier than helium), which comprise about 1 or 2 percent of their mass. These heavier materials are fused from the lighter elements that the stars have collected. Thus, Population I stars contain material that once belonged to stars from previous generations. The Sun is a good example of a Population I star.
What will happen when the Sun dies? In several billion years, our mother star will burn much brighter. It will expend more and more of its nuclear fuel, until little is left of its original hydrogen. Then, at some point in the far future, all nuclear reactions in the Sun’s center will cease.
Once the Sun passes into its "postnuclear" phase, it will separate effectively into two different regions: an inner zone and an outer zone. While no more hydrogen fuel will remain in the inner zone, there will be a small amount left in the outer zone. Rapidly, changes will begin to take place that will serve to tear the Sun apart. The inner zone, its nuclear fires no longer burning, will begin to collapse under the influence of its own weight and will contract into a tiny hot core, dense and dim. An opposite fate will await the outer region, a loosely held-together ball of gas. A shock wave caused by the inner zone's contraction will send ripples through the dying star, pushing the stellar exterior's material farther and farther outward. The outer envelope will then grow rapidly, increasing, in a short interval, hundreds of times in size. As it expands, it will cool down by thousands of degrees. Eventually, the Sun will become a red giant star, cool and bright. It will be so large that it will occupy the whole space that used to be the Earth's orbit and so brilliant that it would be able to be seen with the naked eye thousands of light-years away. It will exist that way for millions of years, gradually releasing the material of its outer envelope into space. Finally, nothing will be left of the gaseous exterior of the Sun; all that will remain will be the hot, white core. The Sun will have become a white dwarf star. The core will shrink, giving off the last of its energy, and the Sun will finally die.