In Chapter 5, the boys hold an assembly to discuss the things they should do to survive on the island, and eventually their discussion turns to rumors of a "beast" on the island—an instance of foreshadowing and irony:
"You don’t really mean that we got to be frightened all the time of nothing? Life,” said Piggy expansively, “is scientific, that’s what it is. In a year or two when the war’s over they’ll be traveling to Mars and back. I know there isn’t no beast—not with claws and all that, I mean—but I know there isn’t no fear, either.” Piggy paused. “Unless—” Ralph moved restlessly. “Unless what?” “Unless we get frightened of people.” A sound, half-laugh, half-jeer, rose among the seated boys.
Piggy repudiates the existence of the beast with his usual confident assertions: he trusts science and other products of the adult world, which have taught him, essentially, that the only thing to fear is fear. Piggy reluctantly adds one more thing they might fear: other people. This is foreshadowing for both the revelation that the "beast" on the mountain is the tangled-up parachuter's corpse, and for the climax of the book, when some of the boys themselves kill Piggy. In retrospect, this scene is highly ironic, especially because the other boys laugh and jeer at Piggy for his prediction. Although his warning turns out to be accurate, he is once again ignored and made the butt of the joke.
"Unless we get frightened of people" is also a remarkably clear statement of the moral of the story. As it turns out, the boys didn't need to fear a literal beast or a corpse. They didn't even need to fear never being rescued, as at least two ships pass by them over the course of the novel. Instead, what they should have feared was themselves—the ecstasy, terror, and innate cruelty that causes them to hunt, torture, and kill each other, as well as ignore their responsibilities in favor of play and instant gratification.
In Chapter 12, the British officer finds the boys in the midst of hunting Ralph, a moment filled with dramatic irony:
A semicircle of little boys, their bodies streaked with colored clay, sharp sticks in their hands, were standing on the beach making no noise at all. “Fun and games,” said the officer.
Right before this moment, Jack's tribe has been hunting Ralph to kill him. They have already killed two boys and tortured Samneric. It is not "fun and games," at least not to Ralph! For the reader, who understands the situation and its seriousness, the officer's remark is therefore highly ironic. The officer assumes, like the boys had at the beginning of the book, that their time on a deserted island would be fun. Despite being an adult, the naïve officer cannot comprehend the seriousness of the situation, nor does he recognize the nasty things the boys are capable of.
The phrase "fun and games" contains a further wrinkle which gets at one of the larger themes of the book. There is a blurred definition of "games" on the island. Jack and his tribe do have fun with their hunting, dancing, and cruelty, but that does not make it unserious, especially for their victims. Ralph's attempts to set up shelters and maintain the fire are the opposite of fun and games, and this is in part why the others abandon him. Civilization, it seems, cannot be maintained on fun—and cruelty can easily become fun for the person enacting it, which nevertheless does not make it right.