The short answer is that BEFORE the Sun actually 'dies', the Sun will evolve into what is called a red giant star. Its outer edge will be way out here near the Earth's orbit so that the Earth itself will be Bar-B-Qued. This will happen in about 6 billion years, but our investigations of stars like the Sun show that in about 500 million to 1 billion years from now, the Sun will have grown in its power output so that the temperature of the Earth's surface will be 50 - 100 degrees higher than it is today. The oceans will evaporate into the sky which will cause the earth to heat up just like Venus is today with surface temperatures above 500 degrees F . So, long before the Sun dies, life on this Earth will come to an end. It took multi-celled life about 600 million years to get to were we are today. This means that we are half way finished with the age of life on this planet. 500 million years seems like a long time, but if we take too many wrong turns in creating a future for our species, even 500 million years from now, we will be extinct a long time before that! Natural catastrophies, asteroid impacts and other things can easily cause a devastating impact on humans from which we could not easily recover space travel technology.
Return toAsk the Astronomer