Have you ever wondered why the Sun hasn't already burned out? If we want to keep a fire going we need to add wood. Eventually our gas grills run out of propane so we need to get more. Where in the world is the fuel coming from to keep the Sun going?
This question perplexed intellects for thousands of years. Figuring out what was happening is what helped lead to nuclear bombs and nuclear power. Early in the 20th century the understanding of atoms and fusion began taking place. Scientists realized that the Sun was basically a nuclear power plant of its own. Nuclear power plants can go for a long time just like the nuclear power my submarine used, but the shelf-life so to speak of the atoms/fusion/Uranium is dependent upon the size of the nuclear reactor. The Sun is a massive (there's not a big enough word), nuclear power plant.
Most scientists agree that it has been around about four billion years and won't burn out of fuel for another four billion years. Earth certainly wouldn't exist at this point. Our solar system would crash and burn without the Sun's impact in various ways.