A heat pump works like an air conditioner except the indoor and outdoor coil are essentially reversed. Since it works the opposite of an air conditioner in that way, it's a heater. Instead of burning a gas, it is simply moving heat.
Heat pumps can switch between air conditioning mode and heating mode by the use of a valve. These machines can be extremely efficient in their use of energy. The only issue with heat pumps is that the coils on the outdoor unit freeze up. When that happens, the system switches to air conditioning mode to defrost the coils. In order to not add cold air to the house, the system then switches to strip heat to continue keeping you comfortable. Once the unit has thawed, it automatically switches back to heating mode and deactivates the strip heat.
Due to heat pumps running off of the natural warmth of the world instead of any type of fuel, they are more eco friendly. They can even run as geothermal systems but adequate land must be available for proper piping.
Heat pumps are typically more beneficial to those living in places like Florida and Georgia where the temperature extremes aren't like that of places like New York or Pennsylvania.