Step-by-step explanation:
A chemical reaction in which heat is absorbed by the reactant molecules is known as an endothermic reaction.
For example,

On the other hand, a chemical reaction in which heat energy is released by the reactant molecules is known as an exothermic reaction.
For example,

Thus, we can conclude that when an unknown substance undergoes a chemical change that gives off heat then it means earlier the substance has more heat energy but after the chemical change there occurs a decrease in its heat energy because some of the heat has been released by it.