In the courtroom, Atticus made if fairly clear and obvious to everyone there that Bob was the one who beat his own daughter and blamed it on an innocent black man. Atticus also, through questions to Mayella, revealed several other unflattering facts about Bob-that he is a drunk who doesn't take care of his children, that he beats his kids, that he can't hold a job, and is a lousy man all-around. So, even though the jury came out in Bob's favor, everyone in that courtroom really knew the truth about Bob Ewell: that he was a no-good, low-down coward who had pinned an innocent man for a horrific crime. His drunken laziness was exposed for the entire town. Bob Ewell is a man that despite having no qualities that make him worthy of it, is very prideful. When he gets on the witness stand in court, Lee describes him as a "bantam cock" of a man, which is comparing him to a strutting rooster. A rooster is mean, prideful, a bully and willing to peck other hen's eyes out to assert his territory. And that is exactly what Bob is like.
So, imagine you have been accused of beating your own daughter and being a drunkard, in front of the entire town. It's enough to make anyone angry. With Bob, it happened to be true, but he's not the type to be humbled and apologize; on the contrary, he reacts defensively. His pride is injured, and after the trial he feels like he has to save face and reassert his manliness and rightful standing. That is why he confronts Atticus in the post office, spitting on him, and why he spreads nasty comments about Atticus through the town. He is wounded and angry, and lashes out. I hope that helps a bit; good luck!