Earthen pots or matkas have been used to store and cool water since time immemorial. But how do they keep water cool?
The answer lies in evaporation. When water evaporates, the remaining liquid water becomes cooler. To understand how this works, we need to go to the microscopic scale. In water, the H20 molecules are moving around rapidly in all directions, even in seemingly still water. From physics, the faster the molecules are moving on average, the higher the temperature of the water.
Due to this motion, the molecules constantly collide with each other. On average, their speeds remain the same, thus keeping the temperature constant. Where there is a surface of contact with air, it often happens that when, say molecule A, which is moving towards the surface really fast, collides with molecule B, which is near the surface, molecule B is thrown out of the liquid region at high speed while molecule A nearly grinds to a halt. Even two tennis balls, one nearly at rest and the other moving fast, would behave the same way. It results from the conservation of momentum.
This process is basically evaporation. Since molecule A has lost its speed and the now fast-moving molecule B is now outside, the average speed of the water molecules has gone down and thus its temperature reduces. The more such collisions happen, the more the temperature reduces. The larger the surface of contact with air, the more such collisions can happen and thus more cooling happens.
Earthen pots have countless little holes in them through which water can seep through and come in contact with air. That is why a filled earthen pot is a little damp to touch. The sum total of all these holes provide a huge surface area through which water molecules can escape and thus the water remains cool. Even in the peak of summer!