1. Red Giant Phase:
* In about 5 billion years: The sun will start to run out of hydrogen fuel in its core. This will cause it to expand and cool, becoming a red giant.
* Earth's fate: The sun will engulf Mercury and Venus. Earth's fate is less clear. It might be swallowed by the sun, or it might be pushed further out into the solar system, becoming a frigid, lifeless rock.
2. Planetary Nebula and White Dwarf:
* After the red giant phase: The sun will shed its outer layers, creating a planetary nebula. This will leave behind a dense, hot core called a white dwarf.
* Earth's fate: Even if Earth survives the red giant phase, it will be left orbiting a white dwarf, with no sunlight to sustain life.
3. The White Dwarf Stage:
* The white dwarf will slowly cool over trillions of years. As it cools, it will dim and eventually fade into darkness, becoming a black dwarf.
* Earth will be left orbiting a cold, dark remnant of the sun, devoid of life.
So, to answer your question directly, Earth will likely be destroyed during the red giant phase of the sun's evolution. Even if it survives that phase, it will be left orbiting a cold, dark white dwarf, completely uninhabitable.