The caterpillar's head, like the heads of most other creatures, is the center of many of its senses and contains the necessary apparatus for the caterpillar to perform its most vital function -- eating. On top of its head are two tentacles that, along with small hairs called setae, provide a sense of touch. The caterpillar also has 12 ocelli, or simple eyes -- six on each side. Although these eyes do not allow the caterpillar to see distinct images, using its ocelli it can detect changes in illumination that give it a general sense of its surroundings.
The caterpillar also has multiple organs that help it consume the large quantities of food that contribute to its rapid growth. Its mouth is made up of a lower lip, and upper lip and sharp mandibles, or jaws, that cut its food into bite-sized pieces. Another organ, the maxillae, provides a sense of taste and guides the food into the mouth. The antenna near the mouth provide the caterpillar's sense of smell.
Another organ, the spinneret, is near the mouth, but has no function throughout most of the caterpillar's life. This is the organ that will ultimately produce the silk to spin the caterpillar's chrysalis or cocoon.
A caterpillar's head is that it is the only part of its body that never grows. You can tell which instar -- the period between moltings -- a caterpillar is in by the relative size of the head to the body.
The thorax is the foremost part of the caterpillar's body, just behind the head, and is composed of three segments, or body sections. Each section bears one pair of thoracic legs, which help the caterpillar crawl and hold its food. These are the only legs that are jointed like the legs of most other insects. Each segment also bears more setae, as well as openings called spiracles, which are pores that allow air to enter into the caterpillar's internal airtubes. These airtubes, or tracheae, take the place of lungs and allow oxygen to travel throughout the caterpillar's body.
The last 10 segments of the caterpillar make up its abdomen. The abdomen, like the thorax, has setae to allow the caterpillar to feel its surroundings, and spiracles for respiration. Unlike the thorax, however, it does not have true legs. Instead, it has unjointed prolegs with hooks on the end that help the caterpillar move. The number of prolegs varies with the species of caterpillar. Anal prolegs are often present as well on the last segment.
After the caterpillar turns into a butterfly or moth, it still has a head, a thorax and abdomen. However, these body parts are not simply a skinnier version of the existing parts, as if the caterpillar had simply lost weight and grown wings. When a caterpillar turns into a butterfly, its whole body is reassembled inside the cocoon. The existing cells in its head, thorax and abdomen may become eye cells, antennae cells or even wing cells.