Bob Ewell curses and spits at Atticus because he's mad at Atticus for making him look bad in front of the entire town. Legally, Bob Ewell attained the victory in the court case. Atticus Finch did not convince the jury of Tom Robinson's innocence. At least that is how the official court record will show it.
Harper Lee does a fantastic job of showing her readers that the only reason Tom was convicted and sentenced was because of his skin color. Atticus proved to everybody in the court room that Tom was innocent. Not only that, but he proved that Mayella was lying, which made Bob and his family look more ridiculous than normal.
When Bob spit in Atticus's face and screamed curses at him, Atticus simply stood there quietly. When Bob asked him if he was too proud to fight, Atticus responded that he was "too old," put his hands in his pockets, and walked away.
Mrs. Crawford described the encounter like this:
"Atticus didn't bat an eye, just took a handkerchief and wiped his face and stood there and let Mr. Ewell call him names wild horses could not bring her to repeat."
Scout and Jem on the other hand think it is a very big deal. They are quite scared for Atticus's safety. They suggest that Atticus maybe carry a gun. Then they try and reason with Atticus. No change in Atticus. Then Scout and Jem mope around the house until Atticus flat out asks what is still bothering them. They say the Bob Ewell encounter. Atticus explains that the encounter was just something that Bob had to get out of his system. Atticus also says that by spitting in his face, Bob most likely wouldn't beat his daughter that night. Atticus's confidence relieves Jem and Scout's concerns, and they no longer worry about it.
"I destroyed his last shred of credibility at that trial, if he had any to begin with. The man had to have some kind of comeback, his kind always does. So if spitting in my face and threatening me saved Mayella Ewell one extra beating, that’s something I’ll gladly take. He had to take it out on somebody and I’d rather it be me than that houseful of children out there. "