An allegory is a literary device in which an idea, a story, or a moral/philosophical belief is translated through characters, prose, poetry, etc. The Lord of the Flies is an allegory for civilization in general, especially the duality of civilization with the potential for good and evil. Some might call the boys' island a microcosm, which is a smaller example of the larger idea: in this case, a smaller society representing the larger global society.
We see the boys, initially united, separate into two camps, eventually becoming enemies with one another. Golding suggests the human tendency to form classes, warring groups, and the tendency for violence. But this is challenged by Ralph and Piggy, who try to keep the peace. Since Ralph and Piggy end up being the minority, Golding suggests that most of society will resort to violence in order to survive. This supposition seems consistent with the end when the boys are picked up by a naval officer and returned to the "civilized world," which is presumably still at war.
There is also the Biblical allusion to the Garden of Eden. The boys are given a paradise, an island with no adults, no rules, and so on. However, some succumb to temptation and resort to embracing a violent, wild way of life. They then destroy that paradise (figuratively, and literally at the end with fire) just as Adam and Eve were thrown out of paradise in the Biblical story.
One of the motifs is the notion of darkness vs. light as a parallel between evil and goodness. The beast is associated with darkness; the beast represents the monster as well as the potential in all the boys for violence. Light represents goodness, and the light of the fire represents hope and salvation.