The sun gives energy to life on Earth, and without this star, we wouldn't be here. But like most things in space, even stars have limited lifetimes, and someday our sun will die.
You don't need to worry about this solar death anytime soon, though. Inside the sun, a churning fusion engine fuels the star, and it still has a lot of fuel left — about 5 billion years' worth.
Stars like our sun form when a huge cloud of gas (mostly hydrogen and helium) grows so large that it collapses under its own weight. The pressure is so high in the center of that collapsing mass of gas that the heat reaches unimaginable levels, with temperatures so hot that hydrogen atoms lose their electrons. Those naked hydrogen atoms then fuse together into helium atoms, and that reaction releases enough energy to counter the intense pressure of gravity collapsing the cloud of gas. The battle between gravity and the energy from fusion reactions fuels our sun and billions of other stars in our galaxy and beyond. [Proton Fusion, the Sun's Power Source, Explained (Infographic)]
What will happen when the sun dies?
But in about 5 billion years, the sun will run out of hydrogen. Our star is currently in the most stable phase of its life cycle and has been since the birth of our solar system, about 4.5 billion years ago. Once all the hydrogen gets used up, the sun will grow out of this stable phase. With no hydrogen left to fuse in the core, a shell of fusion hydrogen will form around the helium-filled core, astrophysicist Jillian Scudder wrote in an article for The Conversation. Gravitational forces will take over, compressing the core and allowing the rest of the sun to expand. Our star will grow to be larger than we can imagine — so large that it'll envelope the inner planets, including Earth. That's when the sun will become a red giant.
For about a billion years, the sun will burn as a red giant. Then, the hydrogen in that outer core will deplete, leaving an abundance of helium. That element will then fuse into heavier elements, like oxygen and carbon, in reactions that don't emit as much energy. Once all the helium disappears, the forces of gravity will take over, and the sun will shrink into a white dwarf. All the outer material will dissipate, leaving behind a planetary nebula.
"When a star dies, it ejects a mass of gas and dust — known as its envelope — into space. The envelope can be as much as half the star's mass. This reveals the star's core, which by this point in the star's life is running out of fuel, eventually turning off and before finally dying," said astronomer Albert Zijlstra, of the University of Manchester in the United Kingdom, in a statement.
Astronomers estimate that the sun has about 7 billion to 8 billion years left before it sputters out and dies. Humanity may be long gone by then, or perhaps we'll have already colonized another planet.