Comedy is characterized by, among other things, sharp contrast in world views, intentions, perceptions of realities, etc. The contrast between the perceptions, actions, and intentions of the Mechanicals, the Court Figures, the Lovers, and the Fairies, all of whom inhabit the same Space and Time, and are yet, to varying degrees, separate, creates a world in the play formed of many realities, weaving, dancing and intertwining, reflective of our own. The stark contrast between all of them as and when they meet, makes this a comic masterpiece.
The comedy in A Midsummer Night's Dream comes from a variety of sources : the lovers, the fairies, Pucky, the rude mechanicals, and the fairy King and Queen. But the cause for these comedic happenings comes from the interaction between the fairy world and the real world. Puck mixing up the lovers' and putting the juice on the wrong eyes creates a hilarious scene between Hermia and Helena.