An allegory is a story in which characters or objects stand for abstract concepts. For example, in Bunyan's Pilgrim's Progress, the abstract concepts of hypocrisy and hopefulness are depicted as individuals named Hypocrisy and Hopeful. Allegory thus works on at least two levels: you could read Pilgrim's Progress as about two individuals named Hypocrisy and Hopeful who interact with an individual named Christian, or you could read the two characters as representing the qualities of hypocrisy and hopefulness in all people, and thus as commenting on human behavior in general.
A fable most often uses animals (though it can use parts of nature, such as the wind, clouds, or the moon and other such objects) to stand for people and to teach a moral lesson. Like an allegory, a fable is a story.
It is easy to see the parallels between the two as well as the differences. Both comment, usually in moralizing ways, on human behavior or society. In allegory, humans/characters stand for abstract qualities, whereas in fables, animals stand in for humans. In both allegories and fables, there is a meaning underlying the surface meaning or events of the stories.
One way to distinguish allegory from fable is to note that an allegory is a figure of speech used within a literary work and a fable is a genre or type of literary work.
An allegory is an extended metaphor in which one thing is described in terms of another. The difference between allegory and metaphor is that a metaphor can be any figure with a tenor and vehicle not using explicit comparison but an allegory normally is extended and has a narrative component.
A fable is a very short narrative, using traditional subject matter, normally framed in simple language and style, and often conveying a moral point.