Allegory comes from Greek words 'allos' (other) and 'agoreuein' (to speak in assembly) - ['agora' meaning 'market place']. An allegory is a narrative or artistic form (a painting, for example) in which a character, place or event can be interpreted as representing a feature in real life.
There is usually a moral and political message conveyed in the allegory. They can be used to hide, or camouflage, the message (from a censor) or make the message more memorable. Personification of abstract concepts is also sometimes a feature. (A 'parable' is a story with a moral, but does not have to be decoded. Some parables (especially Biblical ones) should more properly be called allegories.)
Examples: Christ’s parable of The Prodigal Son, Dante’s Divine Comedy, Aesop’s Fables, Nathan's parable of the ewe-lamb, John Bunyan’s The Pilgrim’s Progress and George Orwell’s Animal Farm. For each of these it is possible to make a list of key characters and events, and then next to each item say what they 'represent', either in real life, or in the meaning of the allegory.
2 Samuel Chapter 12 - The Parable of the Ewe Lamb
There were two men in a certain town, one rich and the other poor. The rich man had a very large number of sheep and cattle, but the poor man had nothing except one little ewe lamb he had bought. He raised it, and it grew up with him and his children. It shared his food, drank from his cup and even slept in his arms. It was like a daughter to him.
"Now a traveler came to the rich man, but the rich man refrained from taking one of his own sheep or cattle to prepare a meal for the traveler who had come to him. Instead, he took the ewe lamb that belonged to the poor man and prepared it for the one who had come to him." David burned with anger against the man and said to Nathan, "As surely as the Lord lives, the man who did this deserves to die! He must pay for that lamb four times over, because he did such a thing and had no pity." Then Nathan said to David, "You are the man!..."
The poor man is Uriah the Hittite
The ewe-lamb is Bathsheba, the daughter of Eliam and wife of Uriah the Hittite.
The rich man is David. (He sent Uriah to his death in battle and seduced Bathsheba.)