The flow of how a cold pack works on a sprained ankle is based on the second law of thermodynamics which states that energy will flow from a higher to a lower temperature. So your body heat will flow to the cold pack in which you will feel the coldness of the pack.