when a solid is placed in a container and heat is applied, a phase change occurs
When something changes phase from solid to liquid, or from liquid to gas, it takes energy to break the intermolecular interactions. These interactions between the water molecules are what make it solid. When you have ice, these interactions are strongest, which is why ice is hard.