As a liquid molecule boils into a gas, it expands, and in doing so, it absorbs heat (cooling anything it comes into contact with - lick the back of your hand). On the other hand, as a gas molecule condenses into a liquid, it radiates heat. Thus, as water hits the hot pan, it creates steam, which then comes into contact with the relatively cool pan handle, causing condensation, which in turn causes heat transfer from steam to pan handle.

Can I have a gold star please?