The boys' descent into evil as they follow Jack is sealed when they sadistically and ritualistically slaughter a pig and eat it, enjoying both the pleasure of triumph over the helpless creature and the pleasure of eating the dripping meat.
Simon, the Christ figure in the novel who represents the superego or conscience, hallucinates as he looks at the dead pig's head, which has been mounted on a stick as if it is an idol to worship. It is surrounded by flies, bringing to mind Beelzebub, the devilish second-in-command to Satan in Milton's Paradise Lost. Milton conceived of the demons in hell in traditional terms as like a swarm of flies.
Simon has spiritual insight into the true meaning of the pig's head as a symbol of evil. This insight emerges in his conversation with it. It says to him,
Fancy thinking the Beast was something you could hunt and kill!
This makes explicit that evil—the "Beast" the boys fear—is within their souls rather something external that can be hunted down and destroyed.
Second, looking at this symbol of evil helps Simon to understand how powerful its allure is. What he, Simon, represents, the head says is not wanted. The boys, led by evil impulses, desire what the head calls "fun": the opportunity to run wild and indulge all their normally forbidden, atavistic instincts towards violence, domination, and cruelty. The boys also wish to live irresponsibly in the moment.
Simon can see through to the core of what this "fun" really is—a rotting, dead head surrounded by flies, something disgusting—but the other boys see only the outer shell of what appears to be freeing and deeply enjoyable. The head says,
You’re not wanted. Understand? We are going to have fun on this island.
The head, the symbol of evil, lies, just as the devil does, because what the boys are having will not turn out to be fun, but a destructive fire that threatens to consume them.