Stars like the Sun are hot because this nuclear reaction happens inside them. The reaction is called nuclear fusion. Nuclear fusion makes light and heat and makes bigger chemical elements. In the Sun (but not all stars) the change which takes place is the production of helium, with minute (very small) amounts of heavier elements.