The same basic principal occurs here. The liquid water absorbs heat from the stove and the molecules move faster and faster until some of them hop out of the liquid and become a gas. We call this steam. The cold of the foil lowered the temperature of the water molecules, so they slowed down and became liquid water again. If you froze the water in the bowl, the molecules would also slow down and become ice again.
All matter has molecules that move.
It just takes different amounts of heat to change their form from solid to liquid to gas. This difference is one way that chemists identify materials. Copper must be put into a very hot furnace to make it melt so we think of it as always solid. Isopropyl alcohol like you might have in your medicine cabinet is a clear liquid like water. If you had a clear solution but didn t know if it was water or alcohol, you could measure the boiling point.