Will the sun ever go out and what would happen to Earth?

The sun will eventually go out just like all the other stars in the universe.

By looking at the rate at which the sun is consuming its fuel, scientists have estimated that it has about 5 or 6 billion more years of life in it before it begins to fade away. Actually, it will be less of a fade than a violent burst of explosions that will end in fizzle.

As the sun’s hydrogen (the sun’s fuel) levels in its inner core get low, it will begin to burn hydrogen located outside its core, causing a burst of fiery expansion. Its parameters will expand outward, sort of like a big balloon.

The balloon will extend past Mercury’s and Venus’s orbit and perhaps into Earth’s atmosphere, killing everything, regardless of how far it reaches. The seas will boil, and life on Earth will be totally consumed by heat. Even if life survived this phase of death—the sun’s red-giant stage—the ensuing white-dwarf stage would do it in.

The white-dwarf stage begins this way: As the outside hydrogen is consumed, helium burns in the core of the sun and produces solid carbon. This carbon hardens and thickens into a small, glowing planet-size ball.

The gases that this burning carbon core give out to the universe are collectively called a nebula.

Eventually, everything but a cold black ball will be burned away, and the heat will slowly subside. The sun will pretty much the end of the line.