An allegory is a prominent figure-of-speech technique used in literature. Often confused with symbolism, which is more narrow, an allegory is an entire story or poem that presents a moral lesson. Characters and events are presented in a way that projects a moral lesson that goes beyond the plot and requires some level of interpretation by readers.
A primary characteristic of an allegory is the infusion of the political or moral values of the writer. Mark Twain often pointed out that he didn't intend to put moral or bigger-picture lessons into his literature. Instead, he wanted his stories to be taken for themselves. In contrast, an allegory requires that the writer have a preconceived point of view that he wants to project in the story. George Orwell's 1945 classic "Animal Farm" is a well-known allegory that reflects Orwell's anti-Stalinist political views in the wake of Russia's 1917 revolution.
An allegory tells a story with multiple meanings. Inherently, the story must have at least two stories -- the literal story presented in the words and the figurative story depicted in the way the writer intends readers to interpret the surface story. Another way of looking at an allegory is that the story played out in the narrative serves as a mirror of the bigger-picture moral the author presents when the elements are pieced together. In Herman Melville's "Moby Dick," Ahab's pursuit of revenge against the whale serves as a metaphor for the conflicts man experiences in trying to overcome self-indulgence to stick to Godly values.
To achieve the moral impact the writer wants, it is typically necessary that the narrative describes polarizing relationships, or at least oppositional views between characters or objects in the story. This trait is important because moral, ethical or political statements typically relate to opposing views or controversial points of view. One of the simplest forms of allegory is the "good versus evil" story in which characters in the story represent good and evil world elements. "The Chronicles of Narnia" by C.S. Lewis is a prominent example.
Personification is a figure of speech used in literature to give human qualities to objects or animals. Personification is common in allegories because of the common premise of telling a worldly story masked through non-human entities. Personification can demonstrate values, mindsets and attitudes common in society. "The Wizard of Oz" is a classic allegory that is driven heavily by personification. Each of the main characters takes on human traits, including the "cowardly" lion and the "brainless" scarecrow. The yellow brick road is also symbolic of the idealistic view of life.