What happens to energy when matter undergoes a chemical or physical change?
During a chemical change, a new substance is created. The atoms that make the current substance are rearranged into new substances. Thus, a chemical reaction has occurred. Examples of chemical changes are decomposition, explosions, burning, oxidation, and fermentation.
On the other hand, during a physical change, nothing new is created. Instead, the shape or phase (state of matter) changes. All phase changes (melting, freezing, evaporation, etc) are physical changes. During a phase change, kinetic energy (energy of movement) is removed or added. This causes the molecules or atoms to move further apart or closer to one another. But nothing new is made!
Other examples of physical changes are cutting, snipping, breaking, smashing, crumpling, etc. The shape or size of the item may change, but nothing new is made.
In all of these cases, energy is being put into the reaction or coming out of it. The conservation of energy is a law of the universe, so this energy is neither created nor destroyed, but simply transferred from system to surroundings or vice versa.