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.
The answers to your many questions about this novel can be found right here on eNotes. See the link below. This novel is a study in the nature of good vs evil. It was written in the aftermath of World War II and during the Cold War when the world was reeling from the effects of the war and asking essential questions about the meaning of life, the nature of man, etc. Golding's view, as illustrated by this novel, was that mankind was essentially evil. Evil is part of our nature. While other writers and philosophers argued that it was society that was evil, Golding tried to illustrate the inherint evil of man by taking a group of innocent boys, not yet corrupted totally by the evils of society, removing them from that society, puting them on a deserted island with only innocent children, and watching them destroy themselves from the evil within (the beast). This is a very Biblical theme because the Bible also teaches that man is basically evil and can only be redeemed through faith. Lord of the Flies is pessimistic, in my view, although others would say it is realistic.
You can read about each of the characters, what they represent, the themes, etc. at the link below.