How the Sun Works
The Fate of the Sun
The sun has been shining for about 4.5 billion years [source: Berkeley]. The size of the sun is a balance between the outward pressure made by the release of energy from nuclear fusion and the inward pull of gravity. Over its 4.5 billion years of life, the sun's radius has gotten about 6 percent bigger [source: Berkeley]. It has enough hydrogen fuel to "burn" for about 10 billion years, meaning it has a bit over 5 billion years left, and during this time it will continue to expand at the same rate [source: Berkeley].
When the core runs out of hydrogen fuel, it will contract under the weight of gravity; however, some hydrogen fusion will occur in the upper layers. As the core contracts, it heats up and this heats the upper layers causing them to expand. As the outer layers expand, the radius of the sun will increase and it will become a red giant, an elderly star.
The radius of the red giant sun will be 100 times what it is now, lying just beyond the Earth's orbit, so the Earth will plunge into the core of the red giant sun and be vaporized [source: NASA]. At some point after this, the core will become hot enough to cause the helium to fuse into carbon.
When the helium fuel has exhausted, the core will expand and cool. The upper layers will expand and eject material.
Finally, the core will cool into a white dwarf.
Eventually, it will further cool into a nearly invisible black dwarf. This entire process will take a few billion years.
So for the next several billion years, humanity is safe -- in terms of the sun's existence, at least. Other debacles are anybody's guess.
For more information about the sun and related topics, look over the links on the next page.