The earth is a massive collector that absorbs and stores heat from the sun. At depths from 20 to 30 feet, depending on the locations and surface characteristics, the temperature of the ground is generally within 5 F of the average annual air temperature. This temperature fluctuates very little throughout the year. In most climates, the ground temperature is warmer tan air temperatures during the winter and cooler than air during the summer.
Water has even more potential for absorbing and storing heat.
Sufficiently large surface water bodies, such as lakes and large ponds that do not freeze solid in the winter can be used for both heating and cooling. Groundwater can also be used.