a heat pump forces the refrigerant to change from a gas to a liquid. it uses a compressor to do this. often, an electric motor drives the compressor. the compressor compresses the refrigerant, and this makes it change from a gas to a liquid. compressing will heat up the liquid extensively.