Refrigerator and heat pump extract heat from the low temperature side, release heat to the high temperature side by doing work on the machine.
Depending on the purpose of the machine, the coefficient of performance is defined differently. Surprisingly, we can extract heat more than the work we added. That is the marvel of thermodynamic laws.