Generally speaking, the majority of caterpillars pose no risk. The ones with hind projections such as the horns at the tail of hawkmoth caterpillars do not sting in any way. Some caterpillars do have urticating spines that could raise water blisters if you brushed them along the inside of your arm. Other caterpillars are distasteful to vertebrate predators such as birds, and we do not suggest trying to eat caterpillars.
Monarch (Danaus plexippus) caterpillar
Monarch caterpillars are a popular addition in classrooms. These caterpillars would be poisonous but not fatal if swallowed, but are not dangerous in any way to touch. Children can safely touch them or have them crawl on their hands. However, be careful! Rough handling or squeezing any caterpillars might be detrimental to the caterpillars and those individuals might not form chrysalids and produce adult butterflies.