Through tearful and angry testimony, Mayella Ewell testifies that she asked Tom Robinson to help her, that he used this opportunity to attack her, and that she couldn't escape because he held her firmly by the neck.
The entire town is aware of the tragic plight of the Ewell children. Their father, Bob Ewell, is an angry drunk, and his children live in a state of dire neglect. Mayella is tasked with assisting the younger kids as best as she can, and it's believable that she would turn to Tom Robinson to help her do some of the heavier tasks around their home:
I said come here, n*****, and bust up this chiffarobe for me, I gotta nickel for you. He coulda done it easy enough, he could.
Mayella thus begins her testimony from a believable situation. She is a young girl in need of assistance with some household chores, and her father certainly isn't ever around enough to help out. Unfortunately, she follows this claim with testimony that later becomes evident is a clear lie:
So he come in the yard an’ I went in the house to get him the nickel and I turned around an ‘fore I knew it he was on me. Just run up behind me, he did. He got me round the neck, cussin’ me an’ sayin’ dirt—
Although Tom's testimony (which follows Mayella's) presents him as a kind and meek man, Mayella exploits the town's racial prejudices in this claim. It is easy for the jury and the courtroom to believe Mayella's lies because she is white and Tom is Black.
Anyone who knows Tom will realize in Mayella's next statement that she is lying:
I fought’n’hollered, but he had me round the neck. He hit me agin an’ agin—
In order for Mayella to be unable to escape from a man who held her firmly "round the neck," the man would have to use both hands to hold her. In his cross-examination, Atticus has Mayella point out her assailant to the courtroom. When she does so, it becomes clear that Tom could not have held Mayella "round the neck" with both hands:
He looked oddly off balance, but it was not from the way he was standing. His left arm was fully twelve inches shorter than his right, and hung dead at his side. It ended in a small shriveled hand, and from as far away as the balcony I could see that it was no use to him.
It simply isn't possible for Tom to do the things Mayella has accused him of, but Mayella never wavers in her testimony. She admits that she "don't know how he done it," but she insists that Tom victimized her.