"Comedy" may be associated with character, laughter, wit & humor, and more, but as a literary genre it is most widely understood as a type of story or narrative.
According to Aristotle's Poetics (part V), comedy characters are of "a lower type" than the royalty of classical Tragedy.
Familiar examples of "low comedy" include the Three Stooges, Chris Farley, and Will Farrell. By "low," they are physical rather than intellectual or spiritual, fleshy and gross rather than refined or ethereal. (Presence of food is often a cue for comedy.)
Oedipus, Clytaemnestra, Antigone, Orestes, Creon are tragic characters. Their physicality may matter at points (esp. at death), but tragedy keeps the physical or sensory aspects of spectacle mostly off-stage.
In comedy or humor, making a spectacle of oneself is required.
Not all comedy is "low" or physical. In "High Comedy," upper-class characters usually appear less physical, more finely built than low comedy's fat boys and gawky-horsey girls (e.g. Lisa Kudrow). Instead of making humor with their bodies, high-comedy figures primarily use words to act funny or witty. High comedies are sometimes characterized as "comedies of manners" in which members of different classes work out their relations—a recent example was the TV sitcom Frazier.
(In contrast to verbal wit by upper-class characters, lower-class characters' use of their bodies is often characterized as physical humor. If low-comic figures make funny with words, it's usually by bungling their language, using wrong words or malapropisms.)
The sitcom or situation comedy is often middle-class and cuts both ways, using both high and low humor. On Seinfeld, Kramer is low-comic or physical, while Jerry is high-comic and witty. Elaine and George can do both or either as required.
Narrative of Comedy
This story-line often begins with a problem or a mistake (as in mistaken identity, false identity or disguise, or a surprising reversal of identities), but the problem is less significant than tragedy. The problem may involve a recognizable social situation, but unlike tragedy, the problem does not intimately threaten or shake the audience, the state, or the larger world. (Compared to tragedy, comedy doesn't have consequences. When someone falls down, they get back up.)
The problem often takes the form of mistaken or false identity or reversal of identities),: one person being taken for another, disguises, cross-dressing, dressing up or down, men or women assuming each other's positions, interests, practices, or identities. Action consists of characters trying to resolve the problem or live up to the demands of the false identity, or of other characters trying to reconcile the “new identity” with the “old identity.”
Comedy ends with the problem overcome or the disguise abandoned. Usually the problem was simply “a misunderstanding” rather than a tragic error. The concluding action of a comedy is easy to identify. Characters join in marriage, song, dance, or a party, demonstrating a restoration of unity. (TV "situation comedies" like Friends or How I Met Your Mother end with the characters re-uniting in a living room or some other common space.)
Occasionally, as in slapstick or farce, comic endings are “circular” with the beginning: the comic characters simply “run away,” supposedly to continue the comic action elsewhere, as in the conclusion of some sketches by the Three Stooges or Laurel and Hardy.
In “dark comedy,” the conclusion is sometimes one of exhaustion, as in The War of the Roses or Rosencrantz and Guildenstern are Dead.