In To Kill Mockingbird, how is tension created when Jem and Scout get attacked by Bob?
It is in Chapter 28, which concerns before, during and after the pageant, that narrates the attack on Jem and Scout. Note how this represents a new moral "low" for Bob Ewell, as, to cowardly to attack Atticus directly, he decides to move against him indirectly by attacking those who are most vulnerable and unable to defend themselves - his children.
Lee is very skilful in how she creates suspense in this chapter - note how it is given a false climax with Cecil Jacobs jumping out on Jem and Scout in the pitch black. This has the effect of lulling us into a false sense of security, much as in horror movies there is a false climax before the "real" horror begins.
It is when Jem and Scout are returning to their house after the pageant that Bob Ewell strikes. Note how tension is created immediately by the fact that Jem and Scout are alone and isolated in the dark. When Jem thinks he hears something and stops Scout and makes her listen, note how Scout describes the silence:
This was the stillness before a thunderstorm.
This sentence clearly indicates that the "storm" is just about to break and danger is going to come upon the children.
Tension is also raised by the sound of their pursuer, who Scout names "Shuffle-foot." The sound he makes allows them to tell when he stops merely following them and begins to run after them:
Shuffle-foot had not stopped with us this time. His trousers swished softly and steadily. Then they stopped. He was running, running toward us with no child's steps.
"Run, Scout! Run! Run!" Jem screamed.
The onomatopoeia in the swishing of the trousers and then the realisation that their pursuer is not a child, but an adult, combined with the screaming of Jem serves to greatly heighten the tension as we wonder what will happen.