One of the main themes of Lord of the Flies is the relation between civilization and savagery and how there's often such a fine line between them. The boys on the island all come from an elite social background in a first world country. They attend what in England is called a public school, which is actually the name given to an elite fee-paying institution, not a public school in the American sense of the term. So we would expect these incredibly well-bred young boys to exemplify civilized values in how they conduct themselves on the island.
However, that is not to be the case. Not long after they find themselves stranded on the island, many of the boys start descending into outright savagery, engaging in torture, murder, and the blood-crazed hunting of pigs. In his portrayal of the boys' unspeakable behavior, Golding is trying to shake us out of our complacency regarding our supposedly civilized values, forcing us to realize that our sense of superiority over so-called lesser cultures is often wholly misplaced. The action of Lord of the Flies puts us in the shoes of the young boys, making us wonder exactly what we would do in such a situation, how we would behave in such a hostile environment. Most of us would like to think that we'd remain civilized, but Golding shows us that we really can't be too sure of that.