In chapter 2 Johnny and Ponybody meet and hang out with Cherry and Marcia. The two girls are the girlfriends of Bob and Randy. The reader also discovers, in chapter 2, why Johnny is so skittish. He was jumped by a group Socs and beaten to within an inch of his life. Johnny swore then that the next time he was cornered like that, he would kill whoever was doing it.
In chapter 4, Ponyboy and Johnny are hanging out near a fountain. The same blue Mustang that carried the Socs to beat up Johnny shows up at the fountain. A group of Socs gets out the car. Johnny and Ponyboy try to run, but they are cornered. One of the Socs grabs Pony and holds his head under the water. Ponyboy is held under for a long time and is close to passing out. The next thing that he realizes is that he's sitting on the ground soaking wet.
The next thing I knew I was lying on the pavement beside the fountain, coughing water and gasping.
Johnny is sitting in a daze next to Ponyboy. Next to Johnny is the dead body of Bob. Johnny had stabbed him with a switchblade. All of the other Socs then ran away. Johnny killed Bob out of self defense. He knew that another beating was coming, and he killed Bob before it started. Johnny also killed Bob to protect Ponyboy. Had Johnny not killed Bob, it's likely that Ponyboy would have drowned in that pond.
"You really killed him, huh, Johnny?"
"Yeah." His voice quavered slightly. "I had to. They were drowning you, Pony. They might have killed you. And they had a blade... they were gonna beat me up...."
"Like..."--- I swallowed--- "like they did before?"
Johnny was quiet for a minute. "Yeah," he said, "like they did before."
Johnny told me what had happened: "They ran when I stabbed him. They all ran..."