Whilst air conditioners are usually associated with making conditions in a room cooler, the science behind making a room cold using an air conditioner actually involves the transfer of heat from the inside of a building to the outside.
An air conditioner uses refrigerant contained within its system to absorb excess heat from a room, which it then pumps out through a system of pipes to an outside coil.
A fan is used to blow ambient air over this hot coil that contains the refrigerant, transferring the heat from the refrigerant to the outdoor air.
The refrigerant is then pumped back indoors and the process begins all over again.
Once the heat is removed only cool air remains to be blown back into the room, thus cooling the indoor area further. This process is reversed in order to heat a room using an air conditioner.