An allegory is a story with more than one level of meaning--a literal level and one or more symbolic levels. Seen as an allegory, William Golding's "Lord of the Flies" has the island represent a type of Garden of Eden in which innocent man arrives in the form of the boys. Ralph, the golden haired born leader and Piggy, the intellectual and rational counterpart lead the other boys until Jack and the other hunters, the savage side of man vie for power with them. Roger, whose evil nature has only been curbed by conditioning in his society--at first he throws rocks only near Henry--sheds all trappings of this civilization to later become consummate evil. The Lord of the Flies, the beast, is the devil, who talks to the spiritual boy, the intuitive Simon, and tells him, "You knew, didn't you?" meaning that Simon sensed that the "beast" is the evil and violence inherent in man.
On a symbolic level, it is the forces of nature that bring the beast to the boys spiritually. Like the rotting pig's head, the parachutist is also rotting, symbolizing the deterioration of the spiritual, wholesome part of man. The boys perceive him as a large ape, thus suggesting their regression to a more primitive, violent state.
The conch is like a horn that calls the boys to meetings, so it symbolizes order/society's rules. The fire is the signal to the boys' society, their hope of rescue; for Ralph and the others, the fire is of paramount importance. And, for Jack and the other savages, it also represents power. When he and his hunters steal the fire, an allusion is made to the mythological story of Prometheus who stole fire from Zeus and gave it to the mortals, thus empowering them.
Other important allegorical symbols are the anonymous masks behind which Jack and the others hide in order to act out their cruelty with impunity and Piggy's glasses, also an empowering instrument, which enable the boys to light the fire. For Piggy, of course, they allow him to see and, thus, be in control of himself. When his glasses are stolen, the symbolic meaning is that the rational side of the boys has been defeated
Even the ship that rescues the boys is not without an inherent evil, for it is a battleship and the man a naval officer, both of whom suggest war and killing.
An allegory can be seen as a fancy metaphor. What this means is that various elements within a story, whether they be people, objects, or any other thing, refer to things that are outside the story. Or we can say that elements in story symbolize things that are technically outside that story. The purpose of allegory usually is to make some point that might be difficult to get across by using propositional statements. Often times the message is moral or religious. When you look at it in this way, allegories require reflection (sometimes a lot of reflection), but this process of reflecting has an effect on the reader and may change the reader’s orientation and perspective. If this happens, allegories have done their job. Hence, the power of allegories!
An example might help here. Often times in the New Testament, Jesus speaks in parable. These parables are really allegories. In one instance, he speaks of a sower spreading seeds (Matthew 13). Some seeds fall on rocky places. Other seeds fall on thorny places. Still other seeds fall along the path, and some happen to fall on fertile ground. The seeds on the rocky places die soon, because of the lack of depth of soil. The seeds in the thorny places are choked because of the thorns. The seeds that fall on the path are snatched up by birds. But the seed on the fertile ground produces a wonderful harvest. The point is not so much to speak of the techniques of farming or sowing, but to illustrate why some people are receptive to the words of Jesus and other are not. Here is the allegorical meaning: The soil represents the various hearts of people. The seed represent the word. The other elements such as the thorns or the birds represent various trials that might come to make the hearing of Jesus’ message hard to follow.
I do not want to give the impression that only religious texts use allegories. It is all over the place. For example, the movie Matrix is filled with allegories. The Machines, Neo, Trinity, the matrix itself, etc. represent things outside the movie. Some reflection will help. In conclusion, the elements of the allegory represent things outside of the story. That is the key.