The source of a star's energy is NUCLEAR FUSION.
Deep in the cores of stars the temperatures are so high (15 million degrees in the Sun) that individual protons (hydrogen atoms stripped of their electrons) will collide with such force that they will join together (by the strong nuclear force) instead of repelling each other (by the electrostatic force).
In most stars, protons are fused together in a 3-step process (THE PROTON-PROTON CYCLE) that ultimately bonds four hydrogen atoms into one helium atom (consisting of two protons and two neutrons).
The final mass of the helium atom is slightly smaller than the total mass of four hydrogen atoms, and this mass deficit is transformed into energy according to Einstein's E=mc2.
The energy appears in the form of kinetic energy (speed) which is manifested in the core as heat (increased temperature).
This energy is shared among atoms (through collisions) from the deepest regions outwards to the surfaces that we see. The energy ultimately leaves the star as radiation - stars shine because of their nuclear furnaces.