There are two types of Heat Pump, Air source (ASHP) and Ground Source (GSHP). 90% of Ground Source Heat Pumps use the suns energy from waste energy heating the ground. True GSHP or Geothermal heat pumps start operating at a whopping 2km.
Air source can be air to air for heating large rooms with warm air or air to water. Air to Water Heat Pumps use latent energy in the air again from the sun to heat the water in properties using a refrigeration gas