Animated example of how the cooling cycle works

The cooling process involves the extraction of heat energy from
the air in the building, and moving it into the earth. Transferring
the heat from the air in the building to the earth involves a
cycle of expansion, condensation, compression, condensation and
evaporation. A refrigerant is used as the heat transfer medium.
The cooling cycle starts as the compressor delivers refrigerant
to the water-to-refrigerant heat exchanger. Heat from the refrigerant
is absorbed by (rejected into) the low temperature source (earth
loop fluid or well water) resulting in the refrigerant turning
cold. The cold refrigerant passes through a refrigerant-to-air
heat exchanger. As warm, humid air from the return air duct system
is passed over the cold air coil, the air is cooled and dehumidified
the returned into the building, cooling the space.
The heat from the warm air that returns to the unit is absorbed by the cold
refrigerant, turning the refrigerant into a hot gas. The hot refrigerant
is returned to the compressor where the process is repeated continuously
during the cooling process. A portion of the heat returning to
the compressor (from the hot return air) is diverted to another
refrigerant circuit that generates hot water and delivers it to
the water heater by way of a small pump.