Compare the way Miss Caroline treats Scout on her first day of school with the way the town treats Mayella Ewell.
Scout is treated unfairly by Miss Caroline for already being able to read and write by the time she turns up for her first day at school. Miss Caroline is a young, inexperienced teacher, working to a strict, unimaginative curriculum. So when one of her pupils turns up for class already functionally literate, she lacks either the imagination or the experience to deal with something new and unexpected.
To a certain extent, Mayella Ewell is treated unfairly by the townsfolk of Maycomb. To most people, she is considered little more than a "tramp" or as "white trash." She comes from a notorious family that people tend to avoid like the plague, so to speak. In that sense, Mayella, unlike Scout, is being judged not for her actions but on the strength of her family's bad name.
However, there are similarities in their respective cases. Scout's unpleasant run-in with Miss Caroline, as with the townsfolk's treatment of Mayella, shows how Maycomb society adheres to certain rules, both formal and informal, that put people into inflexible categories and determine how they are to be treated.