that's metamorphosis, and it is the name for the action of a creature like a caterpillar morphing into a butterfly. lots of insects go through metamorphosis.
A profound change in form from one stage to the next in the life history of an organism.
Snakes undergo a process known as incomplete metamorphosis. This means they do not have distinct life stages like those seen in insects with complete metamorphosis (eggs, larvae, pupae, adults). Instead, snakes hatch from eggs as miniature versions of adults and grow through shedding their skin as they mature. Therefore, their development is characterized by gradual changes rather than a complete transformation.
The author used the words metaphorically. Metaphorically we say that refrigerators "run" because a motor inside turns on. The mother spoke metaphorically when she said she would beat her son "within an inch of his life".