Online Astronomy eText: Stellar Evolution
The Fate of the Earth
(also see The Late Main Sequence Life of the Sun and Outline of Stellar Death)

Summary of the Sun's Future
     As noted in The Late Main Sequence Life of the Sun, the conversion of hydrogen to helium in the core of the Sun is causing it to become larger and brighter. While there is still hydrogen in the core, this process is relatively slow. The Sun has probably increased in brightness by only 50% in the nearly five billion years since it was formed. But as the Sun ages, the process will become faster, and when the hydrogen in the core is exhausted, the Sun will rapidly swell to become a red giant (a process taking a few millions of years) larger than the current orbit of the Earth, remain as a red giant for a few tens of millions of years, then eject a substantial portion of its outer layers, and collapse to become a white dwarf. (All these stages will be discussed in more detail when time permits)

The Effect of Solar Mass Loss on Planetary Orbits
     If the Earth remained in its present orbit, these events would doom it to being swallowed by the Sun, which would vaporize it within a century or so; and for Mercury and Venus, that is certainly what will happen. But for the Earth and the outer planets, a different fate awaits, as the Sun is certain to lose at least some mass while it grows to red giant status, while it is a red giant, and in the ejection of a planetary nebula. And with its lower mass, it will not be able to "hold onto" the planets as well as it can, with its present mass and gravity.
     Mathematically inclined individuals may refer to The Effect of Solar Mass Loss on Planetary Orbits for a discussion of how this process works. To summarize the results, presuming negligible friction between the Sun's lost gas and the planets, the change of mass that the Sun experiences will produce a change in the size of the (remaining) planetary orbits as shown here:

anew / aoriginal = (Mnew / Moriginal) / (2 Mnew / Moriginal - 1)

where a is the (new or original) size of an orbit and M is the (new or original) mass of the Sun. For small changes in the mass of the Sun, the orbital size grows by about the same percentage as the change in the mass, but as the mass loss approaches 50%, the orbital size grows rapidly, and when the mass loss reaches 50%, the planets escape into interstellar space (the same thing happens in binary star systems, when the mass loss exceeds 50% of the total mass of the system):

Mass lossMnew / Moriginalanew / aoriginal
10%
20%
30%
40%
45%
49%
50%
0.90
0.80
0.70
0.60
0.55
0.51
0.50
1.11
1.33
1.75
3.00
5.50
25.5
(lost)

(Other topics to be covered as time permits)
The heating of the planets by the Red-Giant Sun (20 to 40 times current temperatures)
Vaporization of small icy bodies during that stage
The lack of heating of the planets by the White-Dwarf Sun (nearly absolute zero)