the sun is a yellow dwarf. yellow dwarves have a life span of around 10b years. the sun is already 5b years old. in 5 billion years time, it will exhaust it's supply of hydrogen (which it fuses into helium), the core will collapse. at this stage, it starts to fuse helium into carbon, which releases far more energy, and the sun will expand to become a red giant, cooler at the surface, slightly smaller in mass but expanded in size to occupy a space as large as the earth's orbit, two hundred times it's current size.
the earth will have been fried long before this happens, but will eventually be consumed by the sun. after another billion years, the helium will be exhausted, the core will collapse again, the sun will contract and the outer layers explode to become a 'planetary nebula' around the remaining core, a 'white dwarf' with the mass of the sun but the size of the earth. this will burn extremely hot initially but eventually fade into a 'black dwarf'. don't ask me what these look like. they don't exist yet. the universe is too young.