An allegory is an extended metaphor. A metaphor might have one point of commonality between the story and reality; the allegory might have many.
Allegory and metaphor are figures of speeches often seen in literature and art. Metaphor is a phrasal expression, which is used to make a comparison of unrelated objects and actions. Allegory can be said to be an extended metaphor. Allegory is a comparison on a deeper note.
- Differences Between Allegory and Metaphor
Here are a couple of examples, as requested:
The Pilgrim's Progress by John Bunyan is an example of an allegory. It is a story about a man called Christian who meets various people under various scenarios, each of which is named after situations or significant events one might encounter in real life. The life of the protagonist is written as an allegory of the life of a Christian person.
The camel's nose is a metaphor for a situation where the permitting of a small, seemingly innocuous act will open the door for larger, clearly undesirable actions.
- wikipedia
The camel's nose story is told to make one point and only one point. There isn't any particular significance to other body parts of the camel, to the tent, or to any alternate housing for the camel.
Pushing a metaphor beyond its intended point tends to miss the point of the metaphor altogether. Allegories, however, are intended to be mined for the rich mappings to their real-life analogues.