Jem loses his innocence through the process of the trial when he realizes that Maycomb is not a perfect place.
The trial hits the Finch family hard, and their lives are never the same. Jem in particular is changed. He starts out naively thinking that Tom Robinson is definitely going to be acquitted because there is no way he could have committed the crime (and there was no crime).
Jem cries when Tom Robinson is convicted. He later explains to Miss Maudie how he feels.
"It's like bein' a caterpillar in a cocoon, that's what it is," he said. "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)
Jem felt sheltered, and now the reality of the world has hit him. He never thought about racism before. He assumed that the world operated on a principle of fairness. Learning that things are not fair, and even the good people of Maycomb can be racist, is a harsh reality for him. This is how he loses his innocence, and becomes effectively ushered into the real world of adults.