This is called the endothermic mechanism found in most organisms.
Endothermy is a physiological characteristics that enables some animals to control their body temperature unlike exothermics. This mechanism is important due to sudden change in temperature or uncontrollable conditions set by the harsh environment.
So birds sharks salamanders and other related animals have this function.