The sun is currently estimated to be about 4.6 billion years old and has enough hydrogen fuel to last for another 5 billion years or so. After this, the sun will begin to evolve into a red giant. During this phase, the sun's core will become hotter and denser, causing the outer layers of the sun to expand. The sun's surface temperature will cool, and it will become a redder color.
As a red giant, the sun will eventually expel its outer layers of gas, forming a planetary nebula. The core of the sun will remain behind as a white dwarf, which is a very hot and dense star. White dwarfs eventually cool down and become black dwarfs.
So, to summarize, the sun will not last forever because it has a finite amount of hydrogen fuel. Once it has exhausted its hydrogen, it will evolve into a red giant, expel its outer layers of gas, and eventually become a white dwarf.