"symbolic work: a work in which the characters and events are to be understood as representing other things and symbolically expressing a deeper, often spiritual, moral, or political meaning".
I was always told that an allegory is best recognized as an item or person in a story that has a deeper meaning than just being that item or person. An allegory is always a helpful tool in writing. Let's say I want to write about a woman who desires freedom but is in jail. She looks at the cell bars every day and wishes for her freedom. You come to find out that this woman is in jail because she killed her abusive cheating husband. The bars then not only represent her physical incarceration, but also her mindset of being 'trapped' or 'caged' into something she felt she couldn't escape.
The best example I've always seen is in "The Yellow Wallpaper" by Charlotte Perkins Gilman. It's about a woman who supposedly has taken ill, and her husband, for all intents and purposes, confines her to a room with peeling yellow wallpaper. Of course, this is more than just yellow wallpaper. As the story progresses, this woman's "illness" (which before seemed to be a fabrication of the husband) seems to take a turn towards mentally ill. She begins seeing figures moving in the wallpaper, faces leering at her from the wall. The wallpaper, in this case, is an allegory. It's not simply wallpaper, but a symbol of this woman's insanity - whether it be the cause or simply showing the effects.