We know that chemical energy is just another form of potential energy, so when we react chemicals together we can either release that energy (exothermic reactions, like burning a piece of wood) or take energy from the surroundings to store more energy (endothermic reactions, like photosynthesis in plants.
according to this law, the mass of all substances that are present before a chemical change (reactants), equals the mass of all of the substances that remain after the change, which are called products.