Main sequence stars are powered by the fusion of hydrogen into helium. Hydrogen fusion occurs via the proton-proton chain or by the CNO cycle. Stars need a power source to keep shining.
Stars shine because they are hot.
Since stars are hot and dense, they emit energy like a black body, with a luminosity proportional to the fourth power of their temperature. If a star had no power source to replace the energy radiated away in the form of photons, it would cool down. It would take some time to cool down, however, like an iron that's been unplugged. If the Sun, for instance, had no internal power source, it would cool to invisibility in 20 million years . Main sequence stars are powered by the fusion of hydrogen into helium.