The heat needed to change the liquid phase to vapor is taken from the surface or surroundings that are in contact with the liquid.
This is just an expansion on the physical mechanisms involved in the endothermic process already mentioned in the previous answer.
The heat of the environment, relative humidity of the air and air movement are all factors in the amount of cooling that can take place. The driving force is the relative difference between the amount of water (as one example) in the air and the amount that can exist as a vapor in the air at its particular temperature.
Hot, dry air will evaporate liquid water faster. Cooler, wet air will evaporate water slower. Unfortunately this means that when we usually want evaporative cooing the most – hot and humid atmospheres – we get slower evaporation and cooling rates.
Different liquids will have different evaporative cooling effects as their particular ability to vaporize into air and the amount of heat energy absorbed to do that will all be different from each other.