In addition to the response above, an important event in this chapter is the lecture from Aunt Alexandra to Scout. Scout is so impressed that Mr. Cunningham wanted to acquit Tom that she is willing to invite his son, Walter, over whenever he likes. This prompts Aunt Alexandra to remind Scout of the social code that exists in Maycomb. Here Scout is introduced to the important of a caste system among the white people. She knew already - given the outcome of the trail and what Atticus says about it in this chapter - that their is a caste system differentiating people by race; however, here Scout learns that as a Finch, a well respected family in Maycomb, she is not, at least according to Aunt Alexandra, allowed to associate more than the absolute minimum with the lower white trash families, like the Cunninghams. This, of course, goes against everything Atticus has taught Scout (remember back to one of the first chapters where Scout brings Walter home for lunch from school and Atticus visits with him about farming and lets him pour syrup all over his lunch) of crawling into another person's skin and seeing life through their eyes. This too is one of the reasons Jem ends the chapter stating that he now knows why Boo stays inside all the time . . . because he wants to. The reader can infer that it is because of the caste system and discrimination inherent in Maycomb.
In regards to the trial, Atticus explains that no matter how ridiculous Bob and Mayella appeared on the stand, a white man's word will always outweigh a black man's word. However, knowing that Mr. Cunningham wanted to acquit Tom, Atticus feels that times are slowly changing, and has hopes that in the appeals courts, away from town and the influence of knowing your neighbors, Tom stands a chance of being released.
In regards to Bob Ewell's outburst, Atticus again explains that it is necessary to step into another man's shoes. He understands that he made Ewell look like a fool on the stand, and that Ewell needs to regain his self-esteem. Spitting on Atticus was his revenge, and allowed him to regain the upper hand.
Unfortunately, Atticus underestimates the depth of Ewell's anger towards him, as readers later discover.