Allegory is a literary device in which characters or events in a literary, visual, or musical art form represent or symbolize ideas and concepts. Allegory has been used widely throughout the histories of all forms of art; a major reason for this, is its immense power to illustrate complex ideas and concepts in ways that are easily digestible and tangible to its viewers/readers/listeners. An allegory conveys its hidden message through symbolic figures, actions, imagery, and/or events. Allegory is generally treated as a figure of rhetoric; a rhetorical allegory is a demonstrative form of representation conveying meaning other than the words that are spoken.
As a literary device, an allegory in its most general sense is an extended metaphor. One of the best known examples is Plato's "Allegory of the Cave." In this allegory, there are a group of people who have lived chained to the wall of a cave all of their lives, facing a blank wall. The people watch shadows projected on the wall by things passing in front of a fire behind them, and begin to ascribe forms to these shadows. According to the allegory, the shadows are as close as the prisoners get to viewing reality.