When used for heating a building on a mild day of say 10 °C, a typical air-source heat pump has a COP of 3 to 4, whereas a typical electric resistance heater has a COP of 1.0. That is, one joule of electrical energy will cause a resistance heater to produce one joule of useful heat, while under ideal conditions, one joule of electrical energy can cause a heat pump to move much more than one joule of heat from a cooler place to a warmer place.
Note that the heat pump is more efficient on average in hotter climates than cooler ones, so when the weather is much warmer (in a desert city or southern city)the unit will perform better than average COP. Conversely in cold weather the COP approaches 1. Thus when there is a wide temperature differential between the hot & cold reservoir's the COP is lower (worse).
When there is a high temperature differential on a cold day, e.g., when an air-source heat pump is used to heat a house on a very cold winter day of say 0 °C, it takes more work to move the same amount of heat indoors than on a mild day. Ultimately, due to Carnot efficiency limits, the heat pump's performance will approach 1.0 as the outdoor-to-indoor temperature difference increases for colder climates (temperature gets colder). This typically occurs around −18 °C (0 °F) outdoor temperature for air source heat pumps. Also, as the heat pump takes heat out of the air, some moisture in the outdoor air may condense and possibly freeze on the outdoor heat exchanger. The system must periodically melt this ice. In other words, when it is extremely cold outside, it is simpler, and wears the machine less, to heat using an electric-resistance heater than to strain an air-source heat pump.
Geothermal heat pumps, on the other hand, are dependent upon the temperature underground, which is "mild" (typically 10 °C at a depth of more than 1.5m for the UK) all year round. Their COP is therefore normally in the range of 4.0 to 5.0.