In Chapter Two of To Kill a Mockingbird, Scout gets in trouble on her first day of school for attempting to explain to her new teacher, Miss Caroline, about the nature of the Cunningham family's poverty. Walter Cunningham has failed to bring a lunch to school, and so Miss Caroline has offered him a quarter to purchase a lunch as long as he pays her back. Scout tries to tell Miss Caroline that Walter will never be able to pay her back--he simply cannot afford to!--but Miss Caroline punishes her insolence instead by rapping her on the hand with a ruler and making her stand in a corner.
Thus, in Chapter Three, Scout goes out into the schoolyard looking to get even. She finds Walter Cunningham and "solves" her problem with him by rubbing his nose in the dirt. Ultimately, this just lands Scout another scolding, as Jem catches her doing this, tells her not to pick on someone smaller than her, and invites the boy home for dinner.
Scout gets into trouble on her first day of school. She attempts to get Miss Caroline to understand Walter by explaining the quirks an inadequacies of the "Cunningham's". This gets her into further trouble, and she takes her frustration out on Walter by rubbing his nose in the dirt.
Jem tries to smooth things over by inviting Walter home for lunch. Scout is rude to Walter during lunch, making fun of his eating habits, and Calpurnia lectures her. She tells Scout that she should not think Finches are better than Cunningham's, and that a guest in their home is a guest, regardless of class distinctions.
Atticus reinforces this idea when Scout complains to him about Calpurnia.