The coils in the air conditioner have a liquid refrigerant inside them- and this liquid is what makes the whole system work! An expansion valve inside the system controls the flow of the refrigerant, and by decreasing the pressure, converts the liquid into a gas.
While a gas, the refrigerant makes the coils extremely cold. A fan blows the air across the coils, cooling the air down. This is the air that is sent around the house, cooling it down!
Once the refrigerant has been used to cool down the air, it is sent through a compressor, turning it back into a liquid. This is what allows the cycle.
The compressor creates some heat inside the system, and that is sent out by the fan on top of the air conditioner.