Atticus asks Sheriff Heck about Mayella's beating on her face. On the witness stand, Heck states that Mayella was beaten on the right side of her face. This proves that the man who assaulted her had to be left handed. Heck also states that she had finger markings on her throat that went all the way around. This proves that someone used both hands to try and choke Mayella.
Atticus then proceeds to prove that Tom Robinson could not have assaulted Mayella. Tom Robinson's left arm is crippled. He could not have been the one who beat Mayella or choked Mayella. Atticus does a fine job defending Tom Robinson.
Atticus has Tom Robinson stand up and show that his left arm is indeed crippled. This proves his innocence. Tom Robinson made a mistake in helping Mayella, but he never assaulted her:
Tom Robinson is a mild-mannered, conscientious black man whose kind acts earn him only trouble when Mayella Ewell accuses him of rape. Because he saw she was left alone to maintain the household without any help from her family, he often performed small chores for her. During his testimony, he relates that he felt sorry for the girl. This remark affronts the white men in the jury, who see it as evidence that he is overreaching his social station.
Mayella lies on the witness stand. She is covering up for her father, Bob Ewell. Mayella knows that Tom robinson is innocent, but she accuses him of assault and rape.
Atticus proceeds to interrogate Bob Ewell. He points out that Bob Ewell is left handed and could have assaulted Mayella. Even though Bob Ewell is despised by the Maycomb society, an all white jury would rather see a black man convicted of a crime he didn't do than to convict a white man over a black man:
Bob Ewell is despised by Maycomb society as a shiftless drunkard. He is unable to keep a job, spends all his relief money on alcohol, and traps animals outside of hunting season. He provides little support to his large, motherless family, and is reputed to beat his children (and perhaps sexually abuse them too, as Mayella's testimony hints).
An all white jury finds Tom Robinson guilty. Bob Ewell walks away a free man.