Heat is a form of energy to which abides to the principle of energy conservation. Heat can flow naturally from higher potential (higher temperature) to lower (lower temperature). However to transfer heat from lower temperature to higher, we need to have mechanism and some energy input. Refrigeration cycle provisions this flow of heat from lower temperature to higher temperature.