Air conditioners work by using an evaporator to receive liquid refrigerant and control its flow to the compressor and condenser. The condenser facilitates heat transfer by removing heat from the surrounding air and transferring it to the refrigerant, changing its state. An expansion valve then regulates the refrigerant flow into the evaporator, which is important for proper AC function. The compressor pressurizes and pumps the refrigerant between the condenser and evaporator, compressing and cooling it in the process.