Air conditioners are devices that transfer heat from an enclosed space to the outside air. The motor-driven compressor in an air conditioning system powers the whole heat-transfer cycle. Air conditioners rely on two facts of nature. One is that heat flows from a high-temperature area to a lower temperature area. The other is that gases always flow from a high-pressure area to a low-pressure area.
The heat-transfer cycle starts as the compressor squeezes the refrigerant. This squeezing action raises its temperature well above that of the surrounding atmosphere. The squeezing action also pressurizes the refrigerant just to its liquefying point so it can flow through the system. The hot, pressurized, liquified refrigerant flows to a condenser coil where it gives up its excess heat to the cooler atmosphere. Typically, a fan blows air through the condenser coil to facilitate transfer of the excess heat.
After shedding its excess heat to the atmosphere, the refrigerant flows to an evaporator coil where it expands into a gas at the reduced pressure in the evaporator, which is located in the space to be cooled. This expansion requires heat, which is drawn from the air in the enclosed space that's being cooled. This warms the refrigerant. The cold evaporator also draws humidity from the air. A fan blowing across the evaporator coil facilitates this transfer of heat and humidity. As the compressor pushes hot pressurized refrigerant toward the condenser, it pulls the warm vaporized refrigerant from the evaporator to start the cycle all over again.
Two types of compressor dominate HVAC systems in buildings: piston and scroll. The piston type uses pistons attached to a motor-driven crankshaft to draw in and compress the refrigerant. Scroll compressors use an orbiting scroll on an eccentric motor-driven crankshaft to suck in vaporized refrigerant and push it into a stationary scroll whose volume gradually decreases to compress the refrigerant. There are three forms of compressor construction. Hermetically sealed units have motor and compressor sealed within a welded steel casing. They can't leak, but they also can't be repaired. Semi-hermetic units put motor and compressor inside a steel shell whose halves are sealed with a gasket and bolts. These can be opened for repairs, but might leak refrigerant. Open compressors have motor and compressor as separate units linked by a coupling. This variety is found in very large HVAC systems.