Plot device

A plot device or plot mechanism
is any technique in a narrative used to move the plot forward. A clichéd plot device may annoy the reader and a contrived or arbitrary device may confuse the reader, causing a loss of the suspension of disbelief. However, a well-crafted plot device, or one that emerges naturally from the setting or characters of the story, may be entirely accepted, or may even be unnoticed by the audience.
Stories using plot devices.
Many stories, especially in the fantasy genre, feature an object or objects with some great magical power, such as a crown, sword, or jewel. Often what drives the plot is the hero's need to find the object and use it for good, before the villain can use it for evil, or if the object has been broken by the villains, to retrieve each piece that must be gathered from each antagonist to restore it, or, if the object itself is evil, to destroy it. In some cases destroying the object will lead to the destruction of the villain.
In the Indiana Jones film series, Jones is always on the hunt for some mystical artifact. In "Raiders of the Lost Ark", he is trying to retrieve the Ark of the Covenant; in "Indiana Jones and the Last Crusade", Jones is on a search for the Holy Grail. This plot device is also used in the "Arabian Nights" tale of "The City of Brass," in which a group of travelers on an archaeological expedition journeys across the Sahara to find a brass vessel that Solomon once used to trap a jinn.
Several books in the Harry Potter series orient around a search for a special object. In "Harry Potter and the Philosopher's Stone", Harry believes there is a magical stone in Hogwarts with special powers. Lord Voldemort needs this stone to bring back his body, and Harry looks for the stone first to prevent Voldemort's return.
The One Ring from J. R. R. Tolkien's novel, "The Lord of the Rings" has been labeled a plot device, since the quest to destroy it drives the entire plot of the novel. However, as British Classical scholar Nick Lowe puts it: "Tolkien, on the whole, gets away with the trick by minimizing the arbitrariness of the ring's plot-power and putting more stress than his imitators on the way the ring's power moulds the character of its wielder and vice-versa."
Examples.
Deus ex machina.
The term "deus ex machina" is used to refer to a narrative ending in which an improbable event is used to resolve all problematic situations and bring the story to a (generally happy) conclusion.
The Latin phrase "deus ex machina" has its origins in the conventions of Greek tragedy, and refers to situations in which a mechane (crane) was used to lower actors playing a god or gods onto the stage at the end of a play.
The Greek tragedian Euripides is notorious for using this plot device as a means to resolve a hopeless situation. For example, in Euripides' play "Alcestis", the eponymous heroine agrees to give up her own life to Death in exchange for sparing the life of her husband, Admetus. In doing so, however, Admetus grows to regret his choice, realizing the grief of her passing would never leave him. Admetus is seized by guilt and sadness, wishing to keep her or die alongside her, but held by his obligations to raise their children. In the end, though, Heracles shows up and seizes Alcestis from Death, restoring her to life and freeing Admetus from the grief that consumed him. Another example of a "deus ex machina" is Gandalf in "The Hobbit". With the help of seemingly limitless magical capabilities, he rescues the other main characters from all sorts of troubles. The first person known to have criticized the device was Aristotle in his "Poetics", where he argued that the resolution of a plot must arise internally, following from previous action of the play.
Love triangle.
A frequently used plot mechanism in romances and dramas is a "love triangle, where two men try to get the same woman." 
MacGuffin.
A MacGuffin is a term, popularized by film director Alfred Hitchcock, referring to a plot device wherein a character pursues an object, though the object's actual nature is not important to the story. Another object would work just as well if the characters treated it with the same importance. Regarding the MacGuffin, Alfred Hitchcock stated, "In crook stories it is almost always the necklace and in spy stories it is almost always the papers." This contrasts with, for example, the One Ring from "The Lord of the Rings", whose very nature is essential to the entire story. Not all film directors or scholars agree with Hitchcock’s understanding of a MacGuffin. According to George Lucas, "The audience should care about it [the MacGuffin] almost as much as the dueling heroes and villains on-screen". Thus MacGuffins, according to Lucas, are important to the characters and plot.
MacGuffins are sometimes referred to as "plot coupons" (especially if multiple ones are required) as the protagonist only needs to "collect enough plot coupons and trade them in for a dénouement". The term was coined by Nick Lowe.
Plot voucher.
A "plot voucher", as defined by Nick Lowe, is an object given to a character (especially to the protagonist) before they encounter an obstacle that requires the use of the object. An example of a plot voucher is a gift received by a character, which later impedes a deadly bullet.
Quibble.
A quibble is based on an argument that an agreement's intended meaning holds no legal value and that only the exact, literal words agreed on apply. For example, William Shakespeare used a quibble in "The Merchant of Venice": Portia saves Antonio in a court of law by pointing out that the agreement called for a pound of flesh, but no blood, so Shylock can collect only if he sheds no blood.
Red herring.
The function of a red herring is to divert the audience's attention away from something significant. Red herrings are very common plot devices in mystery, horror, and crime stories. The typical example is in whodunits, in which facts are presented so that the audience is tricked into thinking that a given character is the murderer, when it is actually another character.
Shoulder angel.
A shoulder angel is a plot device used for either dramatic or humorous effect in animation and comic strips (and occasionally in live-action television). The angel represents conscience and is often accompanied by a shoulder devil representing temptation. They are handy for easily showing inner conflict of a character. Usually, the angel is depicted on (or hovering near) the right shoulder and the devil or demon on the left, as the left side traditionally represents dishonesty or impurity (see Negative associations of left-handedness in language). 
The idea of a shoulder angel and devil consulting the person in the center of the dispute is a tripartite view of the divided soul, that contributes to a rich tradition involving Plato's Chariot Allegory as well as id, ego and super-ego from Freudian Psychoanalysis. The difference with other views is that the shoulder angel and devil emphasize the universal ideas of good and bad.