
In around 5 billion years, the sun will run out of the fuel needed for nuclear fusion in its core. This will cause its inner core to collapse under the force of the sun's own gravity. At this point, the star's outer layers (where nuclear fusion is still happening) will swell out, and it will enter a stage of stellar life called the red giant phase.
This red giant phase will signal destruction for inner solar system planets, including Earth. Other stars in the universe will experience the same fate as our sun, meaning any exoplanets orbiting close to those other stars will also face such destruction.