When you're fasting, you stop the supply of energy, but your body must burn energy to function. Our bodies have plenty of energy stores in the form of glycogens. The process our bodies use to burn this energy, called Glycolysis, lasts for the first 16-24 hours of fasting, after which our stores are completely depleted. After this period, the body must seek an alternate energy source — and you may have guessed it right: it comes from burning the stored fat.
The process that our bodies use to get energy from fat is called Ketosis. It is how ketone bodies, which come from fat, are converted to energy.
Another thing that happens when your body switches to ketosis is called Autophagy: the breaking down of senescent or aged cells. The accelerated renewal of cells is associated with health and longevity benefits.