Short answer: The heat is taken from the ground and dumped into the house in heating mode. In cooling mode, the heat is taken from the house and dumped into the ground. Because the earth has a near constant temperature, geothermal heating allows us to use less energy in moving this heat than an air source heat pump.
Now, if that is enough information for you, great! It’s not for me. I like to understand the technical aspects of how things work.
To explain it all without need and advanced degree in physics and thermal dynamics, I’ve simplified it a bit.
The Ground Rules
1. Heat can only travel from high temperatures (sources) to low temperatures (sinks).
2. Heat can not travel if there is no difference in temperature between the source and the sink.
3. Everything inside the heat pump is in a closed system.
4. In a closed system, the amount of fluid contained is unchanging.
The Ideal Gas Law
The ideal gas law is the key to understanding the vapor compression cycle (the cycle used by all heat pump systems including your refrigerator and a/c). With this simple equation, we can relate pressure to temperature which explains how a compressor and some tubes and one little valve can heat a space without using a flame and cool a space without adding ice.
P – Pressure The uniform force per unit area exerted on the working fluid.
V – Volume The amount of working fluid in the closed system.
n – Number The number of moles of gas which describes the amount of working fluid.
R – The universal gas constant 8.314 J/K*mol
T – Temperature The amount of heat in the working fluid.
Ground rules #3 and #4 make our life much simpler. The fact that we are operating in a closed system means that the Volume of fluid and the number of moles of fluid are constant.
Since R is also a constant, Pressure and Temperature are the only two terms that can change in our equation and they are directly related by a constant value. In other words, when Pressure increases, so does Temperature.
This is the key to understanding vapor compression cycles. You can change the temperature of a fluid just by changing its pressure.