In air conditioners and refrigerators, refrigerant gas is used as a medium to transfer heat. The refrigerant gas is compressed and then passed through a series of coils. When the gas is compressed, it causes the temperature and pressure to increase, which in turn causes the gas to become hotter. This hot gas is then passed through the coils of the air conditioner or refrigerator, which causes the heat to be released from the coils and into the room or refrigerator. This process is known as the refrigeration cycle and is used to remove heat from the air or food inside the refrigerator. The gas is then decompressed, causing the temperature and pressure to decrease, and the gas to become cooler. The cool gas is then passed through the coils again, which causes the heat to be absorbed back into the gas. This cycle is repeated over and over again, allowing the air conditioner or refrigerator to maintain a consistent temperature.