Put your hand on the back of your fridge, or on its sides. They are warm. The box that keeps your milk at about four degrees is warm on the outside.

There is no ice in there and no tank of cold gas. There is just a plug in the wall. So how does electricity make things cold? Once you see it, you will know why the door matters, why it hums, and why it needs room behind it.
On a hot day, you shut yourself in the kitchen and leave the fridge door wide open. An hour later, is the kitchen cooler, the same, or warmer? Pick one before you read on.
You have probably heard it: shut the door, or you are letting the cold out. It feels right, because cold air really does spill out of an open fridge. But cold is not something a machine can make. There is only heat, and where it goes.
Where the cold comes from

Start with something you already know. Leave hot tea on the table, and it cools down. Heat flows from warm things to cold things, all by itself. A fridge has to push heat the other way: out of a cold box, into a warmer room.
It does this with a liquid of its own, the refrigerant. Turning a liquid into a gas takes energy. That is why rubbing alcohol feels cold as it dries on your arm: the alcohol takes that energy as heat from your skin. In many fridges today, the refrigerant is isobutane. Water boils at a hundred degrees. Isobutane boils at about minus twelve degrees, so even in a fridge at four degrees, it boils and takes heat as it does.
The boiling point depends on pressure. That is why water boils below a hundred on a high mountain. Inside the fridge, the refrigerant sits at a little over half of normal air pressure, and there it boils at about minus twenty-five degrees. That is cold enough for a freezer at minus eighteen degrees.
That boiling happens in the evaporator, a cold plate or coil of tube inside the fridge. Liquid refrigerant flows in. Heat from the air and the food flows into the plate, and the liquid boils away into vapour. That is where the cold comes from. Heat is leaving the food.
Round the loop

But that heat is now in the vapour, and a fridge cannot throw its refrigerant away. A whole fridge holds only about sixty grams of it, sealed in for life. So the vapour must give up its heat and turn back into liquid, to be used again.
The compressor does the squeezing. It sucks the vapour out of the evaporator and squeezes it, hard. Squeezing a gas heats it up, just as a bicycle pump gets warm. Out comes vapour at about six times normal air pressure, and now it is hot.
The hot vapour flows into the condenser, the coils at the back or inside the sides. It is hotter than the kitchen air, so its heat flows out into the room. As it loses heat, it turns back into liquid. That is the warmth you felt on the back.
The warm liquid then squeezes through the capillary tube, a long pipe barely wider than a hair. On the far side, the pressure is about ten times lower. Part of the liquid boils at once, and that chills the rest to about minus twenty-five degrees. The same refrigerant goes round and round: it boils inside and takes heat from your food, then gives that heat to the room.
A fridge does not make cold. It moves heat from inside the box to the room.
Keeping up
Why does the fridge not run until everything freezes, and why does it never stop for good? Because heat keeps leaking back in, through the walls, the door seal, and every time you open it. The foam in the walls only slows the heat down.

A thermostat watches the temperature. It switches the compressor on when the box creeps up, and off when it is cold enough. In a typical fridge, that is about twenty minutes on, then twenty minutes off, roughly half the time, day and night. The click is the compressor switching. The hum is its motor, spinning at nearly three thousand turns a minute. The gurgle is refrigerant flowing through the tubes.
Here is the surprising part. While it runs, the compressor uses about a hundred watts. For each unit of electricity, a fridge moves about two units of heat out of the box. All of it comes out at the back, so about three units go out for every one that comes in.
Use it
Now back to the kitchen, with the door wide open. Cold air spills out, but the fridge never gets cold enough, so the compressor never stops. It takes heat from the kitchen at the front and gives it back at the back, plus the electricity it uses. So the answer is warmer.
An open fridge is a heater of about a hundred watts.

Look after the coils. They lose heat only if air can move past them. Push the fridge flat against a wall, or let dust pile up, and the compressor works harder for the same cold. Leave a few centimetres behind it. And never chip ice away with a knife, because a hole in the tubes lets out flammable gas.
Say it out loud: why is the back of your fridge warm? Then tell someone the whole idea in four lines. A fridge moves heat, not cold. Inside, a liquid boils at low pressure and soaks up heat from your food. The compressor squeezes it, and the coils give that heat to the room. So an open fridge warms the kitchen.
In one breath
A fridge does not make cold. It moves heat from inside the box to the room, using a liquid that boils at low pressure, a compressor that squeezes it, and coils at the back that let the heat out. That is why the back is warm, and why an open fridge warms the kitchen.