Original: A heat pump can be used to provide heating or cooling. Even though the heat pump can heat, it still uses the same basic refrigeration cycle to do this.
Simplified: In the winter, the heat pump moves heat from the outside to the inside.