Their internal organs can be injured. Cocoons, a stage in the moth life cycle, are pretty tough as long as nobody squeezes them. Handle them carefully by the silk part. Don't handle a chrysalis though, the butterfly's metamorphic stage. They are much more delicate.
Caterpillars have a chemical called juvenile hormone in their bodies that is made by their brain.
The full-grown caterpillars usually wander off the plant some distance to find a place to make their chrysalis. During the feeding and growth stage they just remain under leaves.