
The Sun does use up fuel, but it contains an enormous amount of it and releases energy through nuclear fusion rather than ordinary burning. In the Sun's core, extremely high temperature and pressure allow hydrogen nuclei to take part in reactions that eventually form helium. A small amount of mass is converted into energy. The Sun has been shining for billions of years and has enough hydrogen in its core to continue its current stage for billions more. It is not an unlimited energy source, just an extremely long-lived one on human timescales. Fusion links nuclear physics to the light and thermal radiation that ultimately power most life on Earth.
The useful part of this physics is that it helps people predict and design real things. Engineers often begin with the same simplified model used in school, test where it works, then add more detail when measurements show that the real situation is more complicated.
Nuclear reactions involve changes to atomic nuclei rather than ordinary rearrangements of electrons. In fission, a heavy nucleus splits; in fusion, light nuclei combine. A small change in mass corresponds to a very large energy transfer through E = mc². Stars are powered mainly by fusion, while achieving useful fusion on Earth requires extremely hot plasma to be confined long enough for nuclei to overcome their electrical repulsion.