Okay so this is really neat.
The compressor squeezes the refrigerant (a substance which has a low boiling point, usually it's a gas at atmosphere) until it is a liquid, but because of the pressure, is above its boiling point (the temperature at which it would become a gas under normal atmospheric pressure).
Then the liquid is allowed through an expansion valve and into the evaporator, which is a chamber with lots of space inside it. Once the high pressure liquid refrigerant has the space to become a gas - which it must, because its temperature is higher than its boiling point, remember - its temperature falls to its boiling point. This is because when a substance experiences a phase change (liquid to gas in this case), that substance is at the temperature where the phase change occurs, even if it was a different temperature just before.
Now the cold gas makes the metal body of the evaporator cold, air is passed over the evaporator, and heat from the air is transferred to it, and by extension, the refrigerant.
Now the refrigerant passes through to the compressor, which squeezes it into the condenser, where it becomes liquid again.