Although To Kill a Mockingbird is a story about race, it is first and foremost a story about growing up. Lee used racial tensions in a small Alabama town during the Great Depression as a canvas on which to paint the story of coming of age and learning how unfair the world really is.
Young Scout has very little understanding of race at the beginning of the story. She does not understand why people are against her father defending Tom Robinson.
"Then why did Cecil say you defended niggers? He made it sound like you were runnin' a still." (ch 9)
Atticus explains to her that some people disagree that Tom Robinson should be defended. They think Atticus is a traitor to his race.
Scout gets a further education in racism when she attends church with Calpurnia. It is a black church, and some people object to Cal bringing white children there.
"They's my comp'ny," said Calpurnia. Again I thought her voice strange: she was talking like the rest of them.
"Yeah, an' I reckon you's comp'ny at the Finch house durin' the week." (ch 12)
Scout is surprised that Cal sounds uneducated when she talks to people at church. She learns that most black people do not know how to read. While white children get educated, most blacks have no opportunity.
Finally, Scout gets another lesson in racism from what ultimately happens to Tom. He is convicted, even though Atticus definitively proves the crime never happened, and shot trying to escape.
"What was one Negro, more or less, among two hundred of 'em? He wasn't Tom to them, he was an escaping prisoner." (ch 24)
Atticus comments that to most people, a black man is not a person. Scout feels differently, since she learned to respect all people. Yet part of growing up is understanding how the world works, whether or not it is right.