To put it simply, refrigerators work by transferring the heat inside the fridge to the outside. To accomplish this, the fridge circulates a refrigerant liquid to the evaporator coils which, yes, evaporates it into gas. The evaporation effect cools down the surrounding area, similar to the effect of rubbing alcohol on your skin.