Turn on your oven, and you'll warm up the kitchen. With the oven door open, the kitchen warms up even faster. That much is obvious since the purpose of an oven is to make things hot. But the opposite is not true of your refrigerator.
Running the refrigerator makes the room warmer and if you leave the door open, the kitchen warms up even faster. The first rush of cold air may cool things down a little, but in the long run, the room will get warmer.
To see why, we need to think of heat as energy and cold as a lack of energy. The stove produces heat, but the refrigerator can't actually produce cold. All the refrigerator does is move heat, or energy, from one place to another. As the food inside the refrigerator loses its heator, in other words, gets colderthat heat ends up in the kitchen.
Physicists call this kind of system a "heat pump." But like any motor, the heat pump in your refrigerator needs energy just to run. So while it's busy moving energy out of the fridge and into the kitchen, it's also drawing in more energy in the form of electricity or gas. Since some of that energy is released as heat, you end up with more heat in the kitchen than you started with.
Air conditioners can cool your house because part of the unit is outside. That way the air conditioner can pump the heat out of your house and releases it to the outdoors. So just as your refrigerator heats your kitchen while cooling the food, air conditioners heat the outdoors while cooling your house.