The Sun does not have enough mass to explode as a supernova. Instead it will exit the main sequence in approximately 5.4 billion years and start to turn into a red giant. It is calculated that the Sun will become sufficiently large to engulf the current orbits of the solar system’s inner planets, possibly including Earth. Continue reading for a video and more information.
Once the core hydrogen is exhausted in 5.4 billion years, the Sun will expand into a subgiant phase and slowly double in size over about half a billion years. It will then expand more rapidly over about half a billion years until it is over two hundred times larger than today and a couple of thousand times more luminous.
This then starts the red giant branch (RGB) phase where the Sun will spend around a billion years and lose around a third of its mass. After RGB the Sun now has only about 120 million years of active life left, but they are highly eventful. First the core ignites violently in the helium flash, and the Sun shrinks back to around 10 times its current size with 50 times the luminosity, with a temperature a little lower than today.