An air conditioner is a system which change the temperature, humidity and the quality of the air in a defined space, such a home house, an office building, manufacturing factor, plant, etc. Air conditioner systems come in a variety of shapes and sizes, but they all operate on the same principle: It removes heat and humidity via refrigerants and dirt via air filters from the inner air, and release the heat into outside via outside condenser unit.
There are 3 main mechanical components: a condenser coil, a compressor and an evaporator coil. These 3 components work together to convert the refrigerant from cold gas into liquid, and back again.
Compressor, the heart of a HVAC-R system, is normally located inside/with of condenser unit and circulates the refrigerant in the HVAC-R system under pressure. The cold gaseous refrigerant enters into compressor and cools down the high rotating parts of compressor. The motor inside of the compressor squeezes the gas refrigerant, decreases the volume and raises the pressure and temperature. Hot high pressured refrigerant is discharged into metal fins attached condenser coils where it is converted into liquid refrigerant by lowering the temperature via condenser fan. The liquid refrigerant moves back indoors and enters the evaporator coil via a metering device (fixed piston or TXV). When liquid refrigerant moves through metering device and evaporator coil, it becomes into gas refrigerant and cools the fin attached evaporator coils. A blower fan circulates inner air through the cold evaporator coils, lowers the temperature and moisture of the air. Refrigerant absorbs the inner heat and transfer it to outside and releases the heat into outside through condenser unit. Thus, air conditioning system is a repeating phase changes of refrigerant, temperatures are changed at inner doors and outside doors.
A diagram image is posted here from Archtoolbox.com and a building drawing from Carrier residential air conditioner website for better understanding of the principle of air conditioning system.