A process in which atoms of the same or different elements rearrange themselves to form a new substance. While they do so, they either absorb heat or give it off.