A heat pump is simply a device that extracts heat from a low grade heat source, upgrades the temperature, and rejects it to a higher grade heat sink. A good example of a heat pump is a household refrigerator that draws heat from the food and milk placed in it and rejects heat to the warmer kitchen. It is essentially a device that transfers energy from one place to another.
A heat pump connected to a ground heat exchanger (GHX) extracts heat from the ground and rejects it to the building.
In many buildings there are situations where cooling is needed in one part of the building while another area requires heating. A hotel, for example, may require cooling in a meeting room or in the hotel rooms, while at the same time hot water is required for the showers and laundry. Energy taken from the meeting and hotel rooms can either be rejected to the ground or used to heat water. The water is heated using energy that would normally be thrown away at virtually no cost.
By looking at the whole building it is often possible to take advantage of simultaneous heating and cooling advantages.