One way in which the children in Harper Lee's To Kill a Mockingbird lose their childhood innocence is by being exposed to social injustice as a result of racism. Jem in particular is so disheartened to learn of the existence of social injustice that he feels disillusioned.
In his state of childhood innocence, Jem naively believed that people, especially Maycomb's people, were inherently good. However, witnessing Tom Robinson's trial showed him that the opposite is really the truth, especially when people hold prejudiced beliefs such as racist beliefs. Watching the trial, Jem was convinced beyond a doubt his father would win the case since all evidence pointed to Robinson's innocence, not his guilt. The most convincing evidence is the fact that Mayella had been bruised on the right side of her face, which could have only been accomplished by a left-handed man facing her, whereas Robinson has been crippled in his left arm and hand since he was a child. But, despite this evidence, the jury returns with a guilty verdict, and Jem is crushed to the point of tears. Later, the day after the trial, Jem confesses to Miss Maudie how disillusioned he feels about Maycomb's people:
It's like bein' a caterpillar in a cocoon, that's what it is ... . Like somethin' asleep wrapped up in a warm place. I always thought Maycomb folks were the best folks in the world, least that's what they seemed like. (Ch. 22)
In other words, Jem is saying that whereas he once saw Maycomb as full of good, decent people, he now sees Maycomb's people as predominantly evil due to their racism. Jem would not have this perception if he had not lost his childhood innocence. Though Miss Maudie makes Jem feel a bit better by convincing him that more people tried to help Robinson than he realizes, Jem remains very angered by the social injustices he witnessed.