Our sun is a G-type main sequence star. These stars have a lifecycle of around 10 billion years, and our's is half-way through its life. When these types of stars run out of hydrogen in the core to burn they begin to burn hydorgen stored up in the outer layers. This will cause the Sun to puff up until its radius is 30 times greater. It will, at this point, be a Red Giant.
The outer layers of the sun will expand consuming Mercury, Venus, and most likely earth. As the hydrogen fuel at the core is consumed the core will contract and heat up. Hydrogen fusion will continue along a shell surrounding a helium core, which will steadily expand as more helium is produced. Once the core temperature reaches around 100 million kelvin, helium fusion at the core will begin producing carbon.The Sun will contract back to a bit larger than its original radius and will give off 10 times as much energy as what we are used to now. This phase only lasts another 500 million years, as there are a lot fewer helium nuclei, and the energy production is much less efficient.
As the Sun exhausts the helium in the core, it desperately staves off the inevitable by resorting again to those reserves in its outer layers. Again the Sun expands. This time, it grows so large that its outer edge is only weakly gravitationally bound to the core. The Sun barely holds itself together anymore. This eleventh-hour attempt at life-support is pitifully ineffective; the final red-giant stage can be maintained for only 100 million years.
At this point, the Sun's outer layers, freed from the gravitational clutches of the core, will waft away. Over the course of about 10,000 years, these layers will spread out into space as an enormous sphere of gas lit up by the now-naked hot core. These layers constitute a "planetary nebula," so called because in a small telescope the gas cloud looks a bit like the disc of a planet. The hot core is now a white dwarf, a stellar cinder. As a white dwarf, the ex-Sun will glow white-hot for many billions of years.
After the planetary nebula fades, there is no nuclear fusion at all (no extra fuel, no fuel tank, not even the trunk is left), just a lump of hot carbon and some happy memories. The Sun will be well and truly dead. A dark lump floating in space.
When this happens if something is left of the earth it can be said to be well and truly ended.
Before all this though, at the current rate the sun is increasing in temperature in about 1 billion years all the earths oceans will have boiled away and only cooked rock will be left at which point the earth could be called dead.
Either way in 1-5 billion years this planet will be a cinder.