An overarching example of the play's humor comes from how easily British society believes Eliza Doolittle, a lower class flower seller, is a member of the upper classes based on her new accent and clothing, giving lie to the idea that social class is inborn.
Shaw finds more specific ways, however, to poke fun at the superficiality of the middle classes. When Higgins brings Eliza to his mother's to see if she will "pass" as middle class, the middle-class Eynesford Hills are there. They had previously scoffed at Eliza as a flower girl on the streets. Now they don't recognize her, but are in awe of her beauty when she presents as a middle-class lady. When she uses the vulgar term "bloody," comedy ensues when they think they should adopt the word as the latest fashion.
Shaw also has fun with the supposed gentility of the middle classes in this scene. Higgins presents as his usual rude, boorish self, sits on the edge of the writing desk, which threatens to break it, almost breaks the divan, insults the guests and gets away with it all because no one questions his class status.
Another example of humor comes through Eliza's father, Mr. Doolittle. When he receives a stipend that puts him in the middle class, rather than being happy about it, he does nothing but complain about the stresses of middle-class life: he has to behave respectably, he suddenly acquires all sorts of relatives who are after him for money, and doctors, now that he can pay, want to treat him for all sorts of medical conditions. He can't get a moment's peace.
Throughout the play, Shaw skewers middle-class pretensions.