You can think of it in the same way a refrigerator works: the freon is compressed, therefore heats up (you can feel it at the back of the fridge on the radiator), cools a bit on the radiator before being expanded as it enter the "inside" of the fridge, and your beer stays cool!