Stars are born, they live, and they die. The sun is no different, and when it goes, the Earth goes with it. But our planet won’t go quietly into the night.
Rather, when the sun expands into a red giant during the throes of death, it will vaporize the Earth.
Perhaps not the story you were hoping for, but there’s no need to start buying star-death insurance yet. The time scale is long — 7 billion or 8 billion years from now, at least. Humans have been around only about 40-thousandth that amount of time; if the age of the Earth were compressed into a 24-hour day, humans would occupy only the last second, at most. If contemplating stellar lifetimes does nothing else, it should underscore the existential insignificance of our lives. [What If Earth Were Twice as Big?]
So what happens when the sun goes out? The answer has to do with how the sun shines. Stars begin their lives as big agglomerations of gas, mostly hydrogen with a dash of helium and other elements. Gas has mass, so if you put a lot of it in one place, it collapses in on itself under its own weight.
That creates pressure on the interior of the proto-star, which heats up the gas until it gets so hot that the electrons get stripped off the atoms and the gas becomes charged, or ionized (a state called a plasma). The hydrogen atoms, each containing a single proton, fuse with other hydrogen atoms to become helium, which has two protons and two neutrons.
The fusion releases energy in the form of light and heat, which creates outward pressure, and stops the gas from collapsing any further. A star is born (with apologies to Barbra Streisand).
There’s enough hydrogen to keep this process going for billions of years. But eventually, almost all of the hydrogen in the sun’s core will have fused into helium. At that point, the sun won’t be able to generate as much energy, and will start to collapse under its own weight. That weight can’t generate enough pressure to fuse the helium as it did with the hydrogen at the beginning of the star’s life. But what hydrogen is left on the core’s surface wil fuse, generating a little additional energy and allowing the sun to keep shining.
That helium core, though, will start to collapse in on itself. When it does, it releases energy, though not through fusion. Instead it just heats up because of increased pressure (compressing any gas increases its temperature). That release of energy results in more light and heat, making the sun even brighter.
On a darker note, however, the energy also causes the sun to bloat into a red giant. Red giants are red because their surface temperatures are lower than stars like the sun. Even so, they are much bigger than their hotter counterparts.
Read More: Here