About another 5 billion years worth.
Billions
The sun i approximately 4.57 billion years old and it burned half it's fuel. So it will take approximately another 4.5 billion years for it to run out of fuel completely.
At this point in time hydrogen is being fused into helium. Many, many years down the line, as the hydrogen runs out, the sun will begin fusing heavier and heavier elements for fuel. At least to iron.
Fossil fuels are formed on Earth, not on Sun.
It is estimated that the sun has about 5 billion years left before it exhausts its nuclear fuel and expands into a red giant, eventually engulfing the inner planets, including Earth. It will then transition into a white dwarf and gradually cool down over trillions of years.
First in about 5 billion years the sun will run out of fuel in its core and become a red giant as it burns fuel around its core. After that is finished 7 billion years from now the sun will finally die and become a white dwarf.
5 billion years.
sunspots (apex)
No, the sun will not shine forever. The sun is a star that will eventually run out of fuel and expand into a red giant before collapsing into a white dwarf. This process will last billions of years, but eventually the sun will no longer be able to sustain nuclear fusion and will fade away.
The Sun is estimated, based on its size and energy production, to be about 5 billion years old."The Solar System", Roman Smoluchowski, Scientific American Library, 1983, page 6
Scientists predict that in about 6 billion years, the sun will exhaust its nuclear fuel and start expanding into a red giant. This is based on our current understanding of stellar evolution and the sun's mass and composition. As it runs out of fuel, the sun will eventually shed its outer layers, forming a planetary nebula, leaving behind a white dwarf remnant.
The sun is mostly made up of hydrogen, undergoing nuclear fusion to produce energy. It is estimated that the sun has used about half of its hydrogen fuel in its core, and it has enough fuel left to continue shining for about another 5 billion years.