The physical mechanism is mitochondrial uncoupling proteins (UCP). They regulate how much energy is wasted as heat when converting ADP to ATP, determining how efficient one’s metabolism is. When you lose weight, your UCP proteins start wasting less and less energy when producing ATP, which is one of the things that makes dieting so hard.
Actually affecting that pathway is largely beyond us at the moment (that’s the bro science) but the mechanism is relatively well understood.