No star will burn forever. Why? Because no fuel source is infinite. Like a log burning on a fireplace, the log provides a goodly amount of warmth only so long as there remains fuel, oxygen and heat. The sun's heat comes not from chemical burning, but from nuclear fusion -- nuclear explosions.
The sun "burns" hydrogen to form helium. This process of fusion gives off excess energy. Later, when the sun's core runs out of this fuel, the sun will start to collapse because of gravity and the reduced heat from the failing core. But collapsing produces heat from compression (like the compression of air being pumped into a tire makes the tire hot). Over time, the heat from compression becomes great enough to cause helium to start fusing ("burning") to form heavier elements, like carbon.
Helium burns far hotter, so this pushes more energetically against gravity than did hydrogen, making the sun far larger. But being larger, the surface is now much farther from the source of heat energy and thus cooler, making it redder in color. That will happen in about 5 billion years as Scott says.
But perhaps far more important for us on Earth is the steadiness of the sun's output. Over the next billion years, the sun will become warm enough to wipe out all life on Earth and eliminate the oceans. Earth will become a dry desert long before the sun becomes a red giant. Still, this is so far in the future, humanity will have plenty of time to leave Earth, if it chooses to do so.
Even though, as Scott points out, the sun will continue to give off light for trillions of years, only a small window of that span of time will remain usable for humanity and the life on this world.