Comedic device

Comedic device refers to a kind of device used to make a statement more humorous. In layman's terms, it is what makes things funny.
Repetition is the essential comedic device and is often used in combination with other devices to reinforce them. The "callback" in comedy writing—in which a statement or theme is recalled as the punchline or close of a scene—is a classic example of the tension and release that are possible using repetition. It is also the basis for "Englishman, Irishman, and Scotsman" jokes, where repetition is used to set up a modus operandi and build tension before the Irishman (usually assumed to be the stupid one) provides the resolving juxtaposition.
Hyperbole, an overstatement, is a figure of speech in which statements are exaggerated or extravagant. It may be used to reflect or affect strong feelings or impressions.
An understatement is a figure of speech in which statements are purposely understated. It may be used to indicate the speaker's nonchalance (or obliviousness) regarding an often important or otherwise remarkable situation. It often results in irony where, for instance, the speaker's response to an event does not match how the viewer expects the speaker to react.
A double entendre is a spoken phrase that can be understood in either of two ways. The first, literal meaning is an innocent one, while the second, figurative meaning is often ironic or risqué and requires the audience to have some additional knowledge to understand the joke.
A pun consists of a deliberate confusion of similar words or phrases for humorous effect, whether humorous or serious. A pun can rely on the assumed equivalency of multiple similar words (homonymy), of different shades of meaning of one word (polysemy), or of a literal meaning with a metaphor.
Juxtaposition is a literary technique which causes the audience to compare two elements simply because they are placed next to each other. When the comparison is unexpected, it creates irony. In some cases, this can be created through grammatical ambiguity. For example, success and failure.
The mistaken identity (often of one twin for another) is a centuries-old comedic device used by Shakespeare in several of his works. The mistake can be either an intended act of deception or an accident. Modern examples include The Parent Trap; The Truth About Cats and Dogs; Sister, Sister; and the films of Mary-Kate and Ashley Olsen.
There is a liberating element to saying something that nobody else would say in a civilized environment. Being disgusting or politically wrong in front of an audience can surprise and shock an audience (i.e. jokes about pedophiles).
Comic timing is the use of pacing and delivery to enhance the effectiveness of comedy. Often, comedy writers and performers insert a dramatic pause or beat to allow the audience to discern the subtext of the comedic situation or joke. Additionally, comics may create a laugh from quick juxtaposition between fast and slow timing such as in the case of George Carlin's delivery in his routine "Seven Words You Can't Say On Television".
Slapstick is a type of comedy involving exaggerated physical violence. Slapstick was heavily used by Buster Keaton, Charlie Chaplin, Laurel and Hardy, the Keystone Cops, the Three Stooges. Slapstick is also common in animated cartoons such as Tom and Jerry and Looney Tunes.
Stereotypes in humor are when an exaggerated and oversimplified version of a person or group of people is used to poke fun at the original.
A comedian will sometimes use misdirection to have the audience think they're going to say one thing but then get the proverbial rug pulled from under them during the punchline. An infamous example that seamlessly combines taboo, mistaken identity, and misdirection is a 2011 tweet made by British comedian Jimmy Carr on the tenth anniversary of the September 11 attacks: "Sept 11th Date of terrible air disaster. When Eastern Airlines Flt 212 crashed in 1974. Killing 69. No one will forget that in a hurry."