As Golding himself noted, the objective of the story was to show the fact that even "British boys" have inside of them the capacity for great evil. This capacity is engendered by the tendency of all people, including the boys on the island, to give in to things like paranoia, savagery, and selfishness.
When the boys first gather after Ralph blows on the conch, there is some attempt at organization, a desire to be rescued and to work together towards that end. But in that first meeting and the subsequent ones, Jack's selfishness is evident, the boys quickly grow in their paranoia after hearing stories of a snake-thing in the dark, and they turn to savagery to hold back their fears.
Jack's desire for leadership and his intelligence and ability to figure out that the boys are subject to that same paranoia and desire for the release of savagery allow him to take over control of the island eventually. Ralph sees this in the other boys and in himself as he notes his pleasure in the hunt and the fact that he participated in Simon's murder.
At the end of the novel, when Ralph "wept for the end of innocence, the darkness of man’s heart, and the fall through the air of the true, wise friend called Piggy," Golding is cementing the lesson of the story. This lesson is that those same emotions, paranoia, selfishness and savagery, exist inside all of us. They are what drove the boys to the ferocious state of madness that existed on the island.