Air conditioners use chemicals (refrigerants) that easily convert from a gas to a liquid and back again. This chemical is used to transfer heat from the air inside of a building to the outside air.
The machine has three main parts. They are a compressor, a condenser and an evaporator. The compressor and condenser are usually located on the outside. The evaporator is located inside the building.
The working fluid arrives at the compressor as a cool, low-pressure gas. The compressor squeezes the fluid. This packs the molecule of the fluid closer together. The closer the molecules are together, the higher its energy and its temperature.
The working fluid leaves the compressor as a hot, high pressure gas and flows into the condenser.
When the working fluid leaves the condenser, its temperature is much cooler, and it has changed from a gas to a liquid under high pressure. The liquid goes into the evaporator through an orifice (a very tiny, narrow hole). On the other side, the liquid’s pressure drops. When it does it begins to evaporate into a gas.
As the liquid changes to gas and evaporates, it extracts heat from the air around it.
By the time the working fluid leaves the evaporator, it is a cool, low pressure gas. It then returns to the compressor to begin its trip all over again.
This continues over and over and over until the room reaches the temperature you want the room cooled to. The thermostat senses that the temperature has reached the right setting and turns off the air conditioner. As the room warms up, the thermostat turns the air conditioner back on until the room reaches the temperature.