In To Kill A Mockingbird, Bob Ewell is making up the story about Tom Robinson raping Mayella. Atticus did a good job defending Tom Robinson. He proved that Tom Robinson could not have attacked Mayella. Mayella was attacked, but not by Tom Robinson.
Mayella was beaten by a left-handed attacker. Tom Robinson's left arm was crippled. He could not have attacked Mayella. His left arm did not work at all. It would hang by his side just like rubber. Also, Mayella had choke marks or bruises on her neck. Someone with two good arms and hands had to choke Mayella. Again, Tom Robinson could not use his left arm. He could not have choked Mayella.
Bob Ewell was known to beat Mayella. Mayella even hinted that her father may have been sexually assaulting her. Bob Ewell most likely attacked his own daughter:
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).
Bob Ewell blamed the attack on Tom Robinson because he caught Mayella kissing Tom Robinson. Bob Ewell was furious with Mayella. He took out his frustrations on Mayella by beating her and attacking her. Then Bob Ewell blamed Tom Robinson to protect his own reputation as well as Mayella's reputation.
Bob Ewell was a disgrace in the community. He was a drunkard who beat his children. There is no doubt that he would beat Mayella and then make up a story such as the one blaming Tom Robinson. Tom Robinson was innocent. Atticus proved it. Nevertheless, Tom Robinson died because of a story that Bob Ewell made up.