Here's a breakdown:
* Red Giant Phase: In about 5 billion years, the sun will run out of hydrogen fuel in its core. This will cause the core to contract and heat up, leading to a massive expansion of the outer layers. The sun will become a red giant, engulfing Mercury, Venus, and possibly Earth.
* White Dwarf: After the red giant phase, the sun's outer layers will be expelled, creating a planetary nebula. The remaining core will be a hot, dense white dwarf, slowly cooling over billions of years.
So, while the sun will undergo a dramatic transformation, it won't explode in a sudden, violent event like a supernova.