A fridge cannot “make cold”; physics only moves heat, from wherever it is convenient to be to wherever you insist. So a fridge is a courier: a compressor pushes a refrigerant — a fluid chosen to boil near freezing — around a loop. Upstream of the compressor the gas is squeezed hot and dumps its heat through the coils at the back (that warmth is the fridge doing its job — feel it and you have found where your kitchen’s heat went). Downstream it rushes through a narrow expansion valve, pressure plummets, and the cold boiling fluid absorbs heat from inside the box in the evaporator. Loop again, forever. Cold inside, hotter outside, energy bill paying for the pump.
Run the same machine backwards — pull heat from the cold outdoors and push it inside — and it is a heat-pump heater or air conditioner. The genius is the exchange rate: for each unit of electrical work it can move two to five units of heat, because moving beats generating. This is why heat pumps out-efficiency electric resistance heaters roughly 3:1 and why “efficient cooling” in a hot climate is the same hardware, reversed.
The closing detail that answers a kitchen argument: leaving the fridge door open does not cool the room. The unit just moves heat from the box into the room and adds its compressor waste on top; the net effect is warming, like every machine that claims to make cold anywhere — the AC drip outside your window is the receipt.