A refrigerator (or fridge) is a heat exchanger attached to an insulated chamber; it removes heat from the chamber and pumps it outside. The rear of a refrigerator has plates which feel warm - this is the removed heat being released.
To understand how a heat exchanger works, recall how cold you feel after getting out of a warm bath or pool; the cooling is caused by the water evaporating. Heat exchangers use a similar principle but with a coolant which boils at a low temperature. The coolant is pumped through two coils in the fridge; a condenser coil which is exposed to the outside air and an evaporator coil which is exposed to the air in the insulated chamber. As the coolant is compressed into a liquid in the condenser heat is released to the outside, in the evaporator the coolant evaporates - absorbing heat from the insulated chamber.
A problem with fridges is that the coolant has usually been freon (a CFC), nowadays liquid propane gas is starting to gain favour.