Humanity may end in many different ways. We might kill ourselves through nuclear war, or die from a global disease epidemic. Like all the species on Earth, we’ll eventually be gone. But life will survive and continue to evolve into new and interesting forms. But even the Earth won’t last forever. Eventually, our planet too will end.
So, how will the Earth end? It all depends on how the Sun ends.
The Sun is a happy main sequence star right now, but as it nears the end of its life in about 7.5 billion years, it will begin to swell up as a red giant star. Its size will get so large that it will encompass the orbits of the inner planets. Mercury and Venus will be consumed within the Sun.
As the Sun grows, it will let off ferocious solar winds that dwarf its current winds. These winds will cause the Sun to lose a tremendous amount of mass, and this mass loss will cause the orbit of the planets to start spiraling outward. Scientists used to think that this spiraling outward might actually save Earth. Instead of being consumed by the Sun, it would keep spiraling, always keeping one step away from the expanding Sun.
The current thinking is that it’s not going to be fast enough. Although Earth’s orbit will be spiraling outward, it won’t be fast enough to keep pace with the expansion of the Sun as it becomes a red giant. At some point, roughly 7.5 billion years from now, Earth will end; it’ll be gobbled up just like Mercury and Venus before it.
By that time, let’s hope that future humans have relocated to the outer Solar System. By that time, the habitability zone around the Sun will have expanded to the point that water can be a liquid around Kuiper belt objects, like the dwarf planet Pluto. Can you imagine sitting on a beach on Pluto?