An air conditioner is basically a refrigerator without the insulated box. An air conditioner is doing exactly the same thing as your fridge, except it dumps the heat it takes out of the controlled area and dumps it outdoors instead of in your kitchen. To understand what goes on in the system, let's start where the "freon" gas enters the compressor located typically in the outside part of the unit.
As the Refrigerant gas enters the compressor, it squeezes this freon gas that has just absorbed heat from the indoor air, causing it to become extremely hot. This is just like what happens near the end of a bicycle pump when you push the handle down. The air being compressed into the end of the pump will get hot, because all the heat that the air inside it contained, is squeezed into an area that is many times smaller than where it just was. This now high-pressure freon gas, that is now many times hotter than it was before it got squeezed, runs through a set of coils outside where a fan blows on it to cool the high-temperature gas so that a large portion of this concentrated heat is removed from it. The fan and coil arrangement outside are very similar to a radiator in a car.
As the Outside unit (or radiator) cools this hot vapor, it condenses into a liquid just like steam condenses into water when it loses its heat. This high-pressure freon liquid which has now had a lot of its original heat forced out of it, is then pulled back into the house where it waits its turn to pass through a tiny opening that is the entrance to the indoor coil that sits within your home's air stream.
By using this tiny opening to "back-up" the pressure on the outdoor part of the system, it allows the compressor to maintain a low-pressure side within the indoor coil that is in your home's air stream. When the cooled High-pressure gas finally passes into this low-pressure area, the difference in pressure causes part of it to immediately expand into a gas. In a sense, this is like the compressor working in reverse, because now the cool freon is occupying a bigger area, so the heat that was left in it now has to spread itself out over its bigger size.
This need to use its limited heat over a now bigger gas molecule, causes it to rapidly become quite cold so that as it passes through the indoor coil, the air passing over this coil (the radiator effect again) is cooled and then spread through your home by your home's ductwork. Meanwhile, the heat that was taken out of your home's air, has entered the warming freon gas so that when it gets back to the compressor the whole process is repeated.