If you love tomatoes, you will love what the Braconid wasp can do for you ... The larvae then chew their way out through the skin and spin a cocoon on the back of the hornworm.
Braconid larvae fed on the insides of this hornworm ... In the case of a butterfly, the pupa is inside the chrysalis (other insects may spin cocoons or pupate in the soil) until the adult emerges.