In chapter 24, Atticus comes home and gets Calpurnia. He needs her to go with him out to see Helen, Tom's wife to give her the horrible news. It is in this chapter that Atticus says how Tom died.
"They shot him. He was running. It was during their exercise period. They said he just broke into a blind raving charge at the fence and started climbing over.
The guards called to him to stop. They fired a few shots in the air, then to kill. They got him just as he was going over the fence. Seventeen bullet holes in him."
In the following chapter (25) the town gossips about it, but they all blame Tom. They say it's typical of a black man to run, etc. Then the town pretty much forgets about him. They move on to the next juicy gossip.
Harper's To Kill a Mockingbird is another staple of high school English classes. It offers an abundance of subjects and themes for further study: race, class, gender, etc.
The character of Tom Robinson is shot 17 times by the prison guards as the hopeless Tom tries to escape. The text of the story, at the end of Chapter 24, is as follows:
"They shot him," said Atticus. "He was running. It was during their exercise period. They said he just broke into a blind raving charge at the fence and started climbing over. Right in front of them—“
"Didn't they try to stop him? Didn't they give him any warning?" Aunt Alexandra's voice shook.
"Oh yes, the guards called to him to stop. They fired a few shots in the air, then to kill. They got him just as he went over the fence. They said if he'd had two good arms he'd have made it, he was moving that fast. Seventeen bullet holes in him. They didn't have to shoot him that much. Cal, I want you to come out with me and help me tell Helen." --[Helen is Tom's widow.]
This should clear up any confusion as to what happens to Tom in the story.
Tom could not handle being in jail anymore so when he tried to leave this place and run, the officers shot him 17 times in the back. Even then the citizens of Maycomb did not blame the officers, but in fact blamed Tom as if it was his fault to be shot. Even if he did run, it is important to note that no one stood up for him except Atticus when the reader understands how wrong it was for them to shoot Tom 17 times in the back as this shows how they didn't even treat him like a human just because of his skintone.
He got shot while running away