The Sun gets it's energy from hydrogen atoms in its core being forced together to form helium atoms. During the reaction a small amount of the mass is converted into energy.