Heat does not move instantaneously. It takes time.
When your finger touches the ice cube, heat transfers from your finger to the ice, melting its surface and cooling your finger.
That heat then moves into the rest of the ice cube faster than heat from your body can replenish it. Once enough heat leaves the melted surface, the water refreezes, trapping your skin in the process.
Latest Answers