While there are a million different types of insects, all have a hard exoskeleton which is segmented into three parts. In fact the word "insect" is derived from the Latin meaning segmented.
How Caterpillars Work
A caterpillar spends its life eating -- foliage, some animals like ants and snails, and even its own skin it previously shed. What do caterpillars do with all of this stored up food? And why do they use their waste as projectiles?