The answer to 'how does air conditioner work' is that an air conditioner uses refrigeration to cool the air inside your home. It does this by circulating refrigerant through a closed system of coils and compressors. The refrigerant absorbs heat from the air inside your home, and then releases that heat outside, cooling the air that circulates back into your home.
The key components of an air conditioner are the compressor, condenser coil, evaporator coil, and refrigerant. The compressor pumps the refrigerant through the system, the condenser coil releases the heat outside, the evaporator coil absorbs heat from the indoor air, and the refrigerant carries the heat from inside to outside.