It seems as though Jem is referring both to himself and to Maycomb. The trial has shaken him out of his youthful innocence and naive belief that "Maycomb folks were the best folks in the world, least that’s what they seemed like." In this sense, he himself was the caterpillar...
Unlock
This Answer NowStart your 48-hour free trial and get ahead in class. Boost your grades with access to expert answers and top-tier study guides. Thousands of students are already mastering their assignments—don't miss out. Cancel anytime.
Already a member? Log in here.
in the cocoon, safe and sheltered from harsh outside realities. He thought Maycomb's people were the "best folks in the world" but of course he himself hadn't experienced people anywhere else in the world, as yet.
But maybe the caterpillar image could apply to Maycomb itself, too. It really is a small, sleepy, unremarkable little town which is closed unto itself, without much knowledge or interest in what goes on in big cities and the world at large. Generally life goes on in an even, untroubled way. However, Tom's trial, as an example of social injustice and prejudice, has shaken things up and called Maycomb's stalwart good people, like Atticus, to action. This is underlined by Miss Maudie's reply to Jem:
We're the safest folks in the world .... We're so rarely called on to be Christians, but when we are we've got men like Atticus to go for us.
I think if you read the next thing he says it helps you understand. Jem states "Like somethin' asleep wrapped up in a warm place". (TKAM 215). He has been unaware of the real world until this trial took place. He thought his town was the best place in the world, and this has made him grow up. Jem is growing up, and seeing things through more adult eyes. The caterpillar is nestled in a warm, safe enviroment, yet it changes and must leave the cocoon-just as Jem is doing. His childhood was his cocoon and as he is maturing he must leave the safe and secure notions behind.