In approximately 4500,000,000 years when the sun becomes a red giant. This will not engulf the Earth as with the inner 2 planets but it will incinerate the surface. The will be the end as far as life is concerned, leaving something akin to what Mercury is today. the Earth will continue to orbit the white dwarf, then the black dwarf for eternity.
The whole question of course rests on what you define as being the "end of the world"
what do i define as the 'end of the world' you ask? well..... probably, 'the end of the world' ! ha ha well on the 4500,000,000th year we'll see what happends......