Mayella Ewell accused Tom Robinson, a black man, of rape and battery, knowing it was a false accusation.
There are many reasons why she did this. First, because she had lied to her father as to what she was trying to do with Tom, which was to seduce him. She had to scream "rape" or else she was going to go through the humiliation of being called a huge expletive indicating that she was under the then-unlawful act of intermingling sexually with black people.
The other reason is because Mayella was the typical trashy human being that has no regard for anything or anybody. She knew that what she was doing is wrong, and she was not going to stop until she formed a huge mess about it.
Mayella is also a person with a hint of narcissism. She is abused at home, often lonely, undereducated, not attractive, and lives in dire circumstances. Having all the attention of the town on her must have really been a welcome change when the Ewells where notorious for being excommunicated and unwelcome everywhere else just because of being them. She did enjoy the attention and the opportunity to create a big drama in town. She also took the chance right there and then to verbally abuse all the people in town whom intimidate her for being smart, intelligent, or decent, and call herself a victim.