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.
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".