Heating and cooling in an air source heat pump is accomplished by forcing air by fan over gas refrigerant filled copper coils (like those in domestic fridges) that absorb the heat from the air. The heated gas is then compressed to concentrate that heat which is then either piped inside, to warm the house or outside to cool it.
Images have been sourced from the Encyclopedia of Science (http://www.daviddarling.info), and Heat-pump reviews.com (http://www.heatpump-reviews.com/air-heat-pump.html).