Comedy is a genre of dramatic performance having a light or humorous tone that depicts amusing incidents and in which the characters ultimately triumph over adversity. For ancient Greeks and Romans, a comedy was a stage-play with a happy ending. In the Middle Ages, the term expanded to include narrative poems with happy endings and a lighter tone. In this sense Dante used the term in the title of his poem, the Divine Comedy (Italian: Divina Commedia).
The phenomena connected with laughter and that which provokes it have been carefully investigated by psychologists. The predominating characteristics are incongruity or contrast in the object, and shock or emotional seizure on the part of the subject. It has also been held that the feeling of superiority is an essential factor: thus Thomas Hobbes speaks of laughter as a "sudden glory." Modern investigators have paid much attention to the origin both of laughter and of smiling, as well as the development of the "play instinct" and its emotional expression.
Much comedy contains variations on the elements of surprise, incongruity, conflict, repetitiveness, and the effect of opposite expectations, but there are many recognized genres of comedy. Satire and political satire use ironic comedy used to portray persons or social institutions as ridiculous or corrupt, thus alienating their audience from the object of humor.
Parody borrows the form of some popular genre, artwork, or text but uses certain ironic changes to critique that form from within (though not necessarily in a condemning way). Screwball comedy derives its humor largely from bizarre, surprising (and improbable) situations or characters. Black comedy is defined by dark humor that makes light of so-called dark or evil elements in human nature. Similarly scatological humor, sexual humor, and race humor create comedy by violating social conventions or taboos in comedic ways.
A comedy of manners typically takes as its subject a particular part of society (usually upper class society) and uses humor to parody or satirize the behavior and mannerisms of its members.