Melting and freezing are REVERSIBLE changes. This means that if we undo the change, we can get-back the materials we started with. A good example of this is ICE and WATER.
Remember that in Science, MATERIAL means any solid, liquid or gas that you can detect using your senses! Non-reversible changes result in a NEW and DIFFERENT material.
Birthday cake is a good example of a NEW MATERIAL. We mix together eggs, butter, flour and sugar, add heat and enjoy! BUT... we cannot reverse the changes. 'Cake' cannot be changed back into the ingredients we started with. (We would'nt want to anyway!)
Many non-reversible changes are caused by HEATING.