There are several different types of allegories, ranging from a simple childhood fable to novels. The Bible contains several allegories (the parables told by Jesus). An allegory occurs when one story is told to illustrate a more abstract concept (often, but not always) with some moral implications. Allegories can help readers understand by putting a concept that might be difficult to grasp in terms that are easily understood.
As an example, let's look at a short parable from the Bible:
The sower went forth to sow, and as he sowed, some fell upon the hard way, and the birds came and devoured them and others fell upon stony places where they had not much earth, and straightway they sprung up, because they had no deepness of earth; and when the sun was risen, they were scorched, and because they had no root, they withered away; and others fell among thorns, and the thorns grew up and choked them; but others fell upon the good ground and yielded fruit, some a hundred-fold, some sixty-fold, some thirty-fold: he that hath an ear to hear, let him hear (Matthew 13:3-9; Mark 4:3-9; Luke 8:5-8).
In this parable, we learn about a farmer who's sowing his fields. He spreads seed widely, and the seed that falls on rock (hard soil) does not grow at all--the birds eat it. The seed that falls on poor soil does grow, but it has poor roots, so it quickly dies. Only the seeds that are planted in the good soil grow and prosper. Of course, this story is only about a farmer on its basic level. On an allegorical level, the story is talking about spreading the religious message. People that are determined not to hear the message or change their lives will not. People that don't fully commit to life changes will eventually fade away. Only those that are truly receptive will make the true changes and grow in their faith.