It is generally true that adding energy to a material raises its temperature. However, there is an exception when the system is undergoing a change in phase -- for example, when ice melts into liquid water or liquid water turns into vapor. It takes energy to make this happen, even though the temperature does not change at all while material is changing phase. In the activity you just completed (melting ice in a cup of water, while holding the cup), you know you added a lot of energy to the cup with the ice in it, because your hands got cold; however, the temperature did not change much until all the ice was gone. The energy was invested in melting ice, rather than in changing the temperature. Meanwhile you added a similar amount of energy to the other cup containing only liquid water; since there was no ice to melt, all the energy was used in changing the temperature of the water. The two cups started at the same temperature, but the liquid water became much warmer while the iced water didn't change at all.
Materials form condensed phases (liquids and solids) because the molecules attract each other. It takes energy to pull the molecules apart. The densities of a liquid and a solid are not very different, and so the distances between molecules are also much the same. However, there is a decrease in the number of molecules that are stuck together; energy must be added to make this happen. In a gas the molecules are quite far apart, and it again takes energy to bring about this separation. The first activity that you did revealed that the evaporation of a tiny part of the water cooled the rest to below room temperature. It takes energy to evaporate water, because this involves pulling the molecules far away from each other. This energy has to come from somewhere -- the water that is left behind. Wet things actually are cooler than room temperature , whenever water is able to evaporate from them.
Phase transitions going in the other direction (going from vapor to liquid or
liquid to solid) result in a release of energy. For example, when water
condenses out of the air to form liquid drops,
we get back the energy it took to pull the molecules apart.
The glass on the left is cool, and so water is condensing onto the glass; this
will help warm up the contents of the glass. Steam is a
very effective way to heat something, because it has a lot of energy
to give to anything that is cooler.
The energy involved in changes of phase is very important to how the weather works. The stratosphere (the atmosphere a few miles above the surface) is very cold, and occasionally warmer air from the surface will float up. If the air is dry, not much happens -- the air is rapidly cooled. But air containing a lot of water vapor is harder to cool, because the vapor can turn into liquid water, which releases energy. This is the mechanism that powers the lightening and thunder of a summer thunderstorm and the powerful winds of tornados and hurricanes.
The amount of energy involved in a change of phase is not small: melting an ice cube requires about as much energy as warming the resulting ice water to the boiling temperature, and it takes five times as much energy to boil away a pot of water as it does to heat the water from icy cold to boiling hot (if you think about what happens when you put a pot of water to boil, you will realize that you already knew this). In terms of numbers: to raise the temperature of 250 grams ("1 cup") of 0o water to the boiling point requires 105,000 J (over 3 minutes in a 500 W microwave oven); to turn all of the water into water vapor requires an additional 565,000 J (19 minutes in the microwave). If we had started with a 250 gram block of ice, we would have needed 84,000 J to melt it (another 160 seconds) into ice water.