Explanation:
Atticus goes to the jail in hopes that his presence will stop people from dragging Tom Robinson out of jail and proceed with killing him
Earlier in this, Jem and Scout overhead Heck Tate talking to Atticus about wanting to keep Tom Robinson out of jail the night before the trial starts cause he was concerened about his safety.