Bob Ewell is angry at Atticus for making him look like a fool in front of all of Maycomb (see Ch. 24). First he spits in Atticus\'s face. Then he warns him that one person is down (Tom Robinson) but there are still about two more to go. This likely suggests Atticus and the Judge Taylor.
Next Bob is fired from the WPA - one of the only jobs he has ever had. Then Judge Taylor is home alone reading in his parlor one night when sees a shadow. He notices that someone has entered his house and finished reading with a shotgun in his lap. This was obviously Bob.
Then Bob is warned harshly be Link Deas to stop stocking Helen, Tom\'s widow.
These factors lead up to attack on Jem and Scout Halloween night. He was drunk and leaped on the kids from the trees. Boo sees this and rushes to their aid, killing Bob in the process.
When Atticus is told, he automatically assumes Jem killed Bob in the scuffle. However, Heck Tate covers up the real murderer, Boo. He says that Bob simply fell on his own knife. Here is where you have to make some inferences. Bob is dead with a kitchen knife sticking in him. But was the Bob\'s weapon?
Notice that Tate tells Atticus - when reenacting the murder - that he took the switch blade knife from a drunk man earlier (he is not lying - Bob was drunk and going after the kids with that very knife); however, if you read closely, you can infer that Boo killed him and that Tate is trying to cover things up to protect him.
After the trial, Bob Ewell wants revenge on Atticus because Atticus proved to the whole town that Ewell was the guilty one although Tom Robinson was convicted. The night of the school pageant, Bob Ewell lies in wait for Jem and Scout on their way home. He attacks them just as they get under the tree. When Jem and Scout realize they are being followed, they try to run. Scout falls in her costume and Bob Ewell crushes the chicken wire in her costume. Jem tries to fight but his leg is broken and he's knocked unconscious. Someone comes to their rescue and we find out later it is Boo Radley. He carries the injured Jem home. During the scuffle, Bob Ewell is stabbed with his own knife.