An allegory is a story conveying a meaning other than the basic literal one. Allegories are similar to symbols and metaphors in the sense that they often represent deep ideas that have to be thoroughly analyzed in order to be completely understood. The main difference between the two is the fact that while metaphors are typically vague and broad, allegories address issues in full detail and appeal to the readers imagination for interpretation rather than logic.
While fiction authors often carefully craft allegories with the specific intent of reflecting large real-world issues, it isn't at all uncommon for readers to make connections between the story and current issues that the author never actually intended to exist. A relatively well known example of this can be found in the lord of the rings trilogy. Some readers have suggested that the novels were written as a representation of the World Wars. This notion was denounced by the fact that the novels were actually written prior to the outbreak of the Second World War.
Allegory is a popular method of figurative representation that hasn't just been limited to literature. Clear examples can be seen in other art forms including music and sculpture. One famous piece of American literature that utilizes the device is Arthur Miller's The Crucible which is seen as a criticism of the anti-communist McCarthyism mentality that spread rampantly during the 1950's. It’s easy to see why the creative power that can be created through allegory has remained a popular writing style for so long and why Mary Shelley's Frankenstein is still a classic novel almost two hundred years after its first publication.
In Frankenstein, Shelley uses the rhetorical device to describe multiple large-scale issues that could have gotten her into serious trouble in her time had she blatantly written about them. One allegory in the novel relates to religion and human nature. In this scenario, Victor represents god and his creation...