In order to answer this question thoroughly, you may wish to search the question and answer group, as many questions relative to yours have already been asked. Also there are essays and criticisms written about William Golding's Lord of the Flies as an allegory that are available on enotes. [See the sites listed below this response.]
Golding's narrative about Australian boys stranded on an island during World War II seems pessimistic, especially when one considers that his novel, by his own admission, is a response to an earlier Victorian work, The Coral Island in which stalwart Victorian boys were able to defeat evil forces against them in the shape of indigenous natives from the island.
The characters of Golding's narrative are representative of various aspects of either human nature, a political system, or the human mind, depending upon the interpretation given to the work. For instance, if the interpretation of Lord of the Flies as a political work is taken, then Ralph represents the "born leader" type--handsome, blonde, charismatic. Piggy is the "brains behind the man" type, the intellectual, the adviser who has the mental reasoning powers, but not the looks to be a leader. In contrast to Piggy, Jack is the revolutionary leader, the one who appeals to the emotions of the crowd, ruling by playing upon the fears of the group by exercising his charisma. Roger, who lurks behind the tree in an early chapter, hiding his sadistic desire to hurt little Henry as he plays on the seashore, represents the underlying evil in all men. This innate wickedness, without the constraints of a democratic society then supercedes all rationality and goodness, represented by Piggy and the intuitive, kind Simon. Anarchy results, destruction follows: Roger casts Piggy upon the jagged rocks of the island, and the bloodied body and split head of Piggy are swallowed by the waves of the universal sea.