Stars radiate energy produced due to the fusion reactions that are going on within them. The fusion reactions in stars start with hydrogen as a fuel; two atoms of hydrogen fuse together to form a helium atom.
Stars like the Sun have enough hydrogen to continue the hydrogen fusion reaction for around a hundred million years. Once a sufficient amount of hydrogen has been converted to helium there are other reactions that can place in stars which are dependent on the initial mass of the star. If a star were large enough when it was formed, the temperature in the star would be high enough to allow the fusion of helium to result in elements with a higher mass like nitrogen and carbon. These can undergo fusion themselves and with atoms of lighter elements to produce heavier elements. The process continues till finally iron is formed as a result of the fusion reaction. Iron cannot undergo fusion reactions as the energy generated due to that is less than the energy required for the fusion reaction to start. This makes the reaction unsustainable.
The fuel for fusion reactions in stars is initially hydrogen and as heavier elements are formed they can undergo fusion reactions too until only iron is left in the star.