A heat pump transfers heat from one place to the other. During winter, it transfers heat from the outdoors to the house, making the inside of the home warmer. During summer, it transfers heat from the inside of the house to the outside, thereby making the house cooler.
Naturally, heat moves from a warm area to a cool area. So a heat pump relies on electrical power to reverse this natural flow of heat. Modern heat pumps are more efficient and can work even in temperatures below 10 degrees. Because they transfer heat rather than generate it, heat pumps are more energy efficient than furnaces and boilers.