Eventually, the Sun will run out of fuel, go dark, and other bad things will happen. About how much long is it predicted that we will have a sun functioning as it is currently?
Just to add to Undo's answer, after the expansion to a red giant, the sun will become a planetary nebula, where (according to the link) the fusion reactions inside the star are 'overtaken' by the gravitational collapse, in turn causing the inner layers to condense and heat up causing the outer layers to be blown away. After which, the hot core forms the remnant, a White Dwarf star (NASA source), which is likely to last for several more billions of years.
The image below depicts the current ideas of the expected lifecycle and timeline of the life of the sun:
How do we know what will happen to the sun?
Currently, the main method to determine the solar lifecycle is described by the article "The Future of the Sun" (Cowing, 2013) is to:
Studying stars with the same mass and composition as the Sun, the so-called "solar twins," can give us more information about our own Sun; solar twins of various ages offer snapshots of the Sun's evolution at different phases
Where the mass and chemical composition of a star provide the information needed to determine its lifecycle.
According to Wikipedia:
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.
However, the Sun has more nasty tricks up its sleeves:
Even before it becomes a red giant, the luminosity of the Sun will have nearly doubled, and the Earth will be hotter than Venus is today. 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.
So, it's going to take long enough that we don't really have to worry about it.