When a fluid evaporates, it removes heat. If you want to try for yourself, you can lick the back of your hand and blow on it to dry it. It cools down, and a fridge uses the same principle.