I can't believe I missed this thread until now. I love astronomy and astro-physics! (Yes, I am a geek
) This is the information I have gathered through my own research and study, although I can't quote exact units of time and measure so bear with me...
Our Sun is a rather average star that is approximately half way through it's life...no worries though, seeing as it still has about 4.5 to 5 billion years of life left in it, which is still older than our planet if you ascribe to scientific and evolutionary terms
Upon death, assuming the Sun will take the course that is typical for a star of it's size and mass, it will expand into what is called a Red Giant. If we do, by some miracle, survive on this planet until that time, one of two things will happen: either the Earth will be engulfed by the Sun's expansion, or the gravity of the Sun due to altered proportions of it's mass will relieve it's pull on the Earth and we will drift off on a tangent away from the center of our solar system. So...we'd be looking at either a very toasty or bitterly cold end...neither of which would be very pleasant.
Now, the death of the Sun is only one of many things that could cause the demise of our planet, other threats being more imminent. Not considering things such as NEOs (Near Earth Objects that pose a threat to our planet in terms of collision) and Gamma Ray Bursts (distant electromagnetic events usually cause by the collision of a neutron star with either a black hole or a binary star system that could cause instant destruction if the burst occurs in direct line with Earth), a more likely threat of demise is the collision of our own Milky Way with another galaxy called Andromeda. This is set to take place within a mere 3 billion years.
Even if we somehow were lucky enough to end up on the outskirts of such a collision and were capable of viewing what promises to be an extraordinary event with a front row seat, there are still so many other ways the Earth may come to an end. Not to be all morbid or anything, but it could happen at any moment...just like individual lives, the life of our planet is momentary compared to the vast reaches of time *gets all poetic*