An allegory is a story or figure of speech that uses symbols to express truth. It can be quite lengthy; the book "Pilgrim's Progress," for example, is an extended allegory. An allegory differs from a type in that the event used in the comparison need not be an actual historical event — it is used for the purpose of expressing a truth; whereas in typology the first event is an actual historical event and is significant in its own right as well as shedding light and giving meaning to a second event.
An example of an allegory is:
Son of man, confront Jerusalem with her detestable practices . . . On the day you were born your cord was not cut, nor were you washed with water to make you clean. (Ezekiel 16:2,4)
In this allegory, Israel is likened unto a despised infant who is unwanted by the one who gave birth to him. Notice that the imagery of the despised infant is fabricated in order to shed light on the condition of the relationship between God and Israel. This imagery has no other significance except that it casts light on this relationship.