Physics
Thermodynamics of Heat Pump
Unlike heating oil which uses the combustion and ignition of fuel to create energy, heat pumps use electricity to circulate a water refrigerant mix through pipes that are buried in the ground. The principles in which this process obeys is the first and second law of thermodynamics. The First Law states that energy cannot be created nor destroyed. The Second Law states that the total entropy of a system may never decrease.
By pulling any amount of heat out of a cold environment and putting it into a hot environment you effectively reduce the entropy of the cold environment. This is denoted by ΔS=ΔQ/T. Because of the heat transfer the fluid will now want to flow in the opposite direction, this is why a pump is needed to pull the heat up into the house. This is referred to the work needed to force the thermal extraction, ΔW. Trying to heat a home you want to use as little work as possible while delivering the most amount of heat. The efficiency of the system is defined as the temperature of hot over the change in temperature of the system ε < Th/ΔT.
http://physics.ucsd.edu/do-the-math/2012/06/heat-pumps-work-miracles/