Refrigerated compressed air dryers are one of the most common used types of air dryers. A refrigerated compressed air dryer is the standard choice if you’re shopping for a dryer and don’t have special requirements, like an ultra-low dewpoint. As the name implies, a refrigerated air dryer works by cooling down the air (like a refrigerator). The warm wet air enters the dryer, where it is cooled down to about 3 degrees Celsius. All water vapor that was in the air condenses into water. The liquid water is then removed from the compressed air by a water-trap. After that, the cold air is re-heated to room temperature. Since a lot of water has condensed into water, the air is now much dryer. The cooling is done in the same way as your freezer and fridge are cooled. In a separate circuit, liquid refrigerant is evaporated in the evaporator, to cool down the warm compressed air. The air is cooled, while the refrigerant gets warmer. The refrigerant is compressed by a small compressor and cooled again in the condenser.
Here are two pictures of the inside of an old refrigerated compressed air dryer. You can see the various parts of the refrigerant circuit (with refrigerant compressor and condenser). You can also see the condensate trap with discharge lines. The evaporator (where the refrigerant cools down the compressed air) is located at the top of the dryer (the whole area at the top is the insulated evaporator).