How does refrigerator actually work? In refrigerator, heat energy got extracted from cold sink and dumped into hot source. This is not spontaneous so work must be done. I came across the following while reading a textbook:


  For refrigeration, if no work is done, 
   ΔS= qh/Th+qc/Tc;
  
  -qh=qc, implying ΔS= qh/Th-qh/Tc =qh(1/Th-1/Tc)
  
  qh>0, 1/Th-1/Tc&lt;0, so ΔS&lt;0 so not spontaneous. Therefore, we need to add heat energy to the stream of heat energy flowing from the cold sink to hot source, so that the entropy increase at hot source 'covers up' the decrease in entropy at cold sink, and the total entropy increases.


It does indeed make sense if we look at the value of entropy, but how can this be feasible physically? You want to move heat energy from cold sink to hot source. In terms of molecular motions, the molecules at hot source always vibrate more vigorously and give energy to molecules at cold sink spontaneously. To achieve your purpose, you literally make the molecules at hot source vibrate faster?

If you still do not get what I am asking, imagine you have a flask of water and you want it to flow from A to B. If you punch a hole at B to remove some water at B, the water will flow to B, but adding water to B definitely will not cause more water to flow to B. Now replace water with heat energy, A with cold sink and B with hot source, I think adding heat energy to hot source should not cause cooling of cold sink.

What is my misconception here?
Refrigerators work by exploiting some properties of compressible gases.

To simplify greatly, gases tend to heat up when they are compressed and liquefied. And, when the liquid revapourises this process absorbs energy. |In a refrigerator those two processes are physically separated and this enables the transfer of heat from one place (the inside, which gets colder) to the outside (which gets warmer).

The way this works in a typical refrigerator is to have a compressor on the outside of the cold area that takes gas and compresses it while letting the extra heat dissipate into the outside environment. This combined process of compression and cooling (or, more accurately shedding the extra heat generated by compression) liquefy the gas. This liquid is then allowed to flow into a heat exchanger on the inside of the refrigerator where it is allowed to evaporate. This evaporation absorbs energy from inside the fridge making that environment colder. This gas is then allowed to flow into the compressor, completing the cycle.

This allows the fridge to convert mechanical energy in the compressor into a clever way of transferring energy from the inside of the fridge to the outside. This amounts to exploiting a phase change in the refrigerant into a pump that moves energy from cold to hot. Though this only works because we can separate the inside from the outside thermally enabling the two side of the process to behave normally (heat flows from hot to cold on both sides) but the net flow ends up taking energy from cold to hot by exploiting the energy used to cause a phase change in the refrigerant.