An epiphany is a sudden or unexpected revelation, and Ralph has two of them in chapter seven of William Golding's Lord of the Flies.
At the beginning of the chapter, Ralph is on the other side of the island than the camp where he usually is, and at first he just watches the waves hit the rocks. Soon, though, he looks out at the vastness of the ocean and has a terrifying realization:
On the other side of the island, swathed at midday with
mirage, defended by the shield of the quiet lagoon, one might dream of rescue; but here, faced by the brute obtuseness of the ocean, the miles of division, one was clamped down, one was helpless, one was condemned, one was—
This is an earth-shattering reality for the young boy to realize that they may never get rescued, though Simon soon offers Ralph another revelation, that Ralph is going to "get back all right."
The greater epiphany happens a short time later, when Ralph is hunting with Jack, something he has never done before. Until this chapter, Ralph has always dismissed Piggy's assertions that Jack wants to kill Ralph. It does not seem reasonable to Ralph, since he has never done anything to hurt Jack; and since Piggy has always been rather afraid of Jack, Ralph assumes this is just a melodramatic idea without any substance. During this hunting expedition, Ralph realizes Piggy is right.
When Jack is not leading effectively and Ralph takes some control over their expedition, Jack gets angry and begins to taunt Ralph in the same way he has always taunted Piggy, something Jack had never done before now. Something between them changes during this exchange, and Ralph asks
despairingly, out of the new understanding that Piggy had given him. “Why do you hate me?” The boys stirred uneasily, as though something indecent had been said. The silence lengthened. Ralph, still hot and hurt, turned away ﬁrst.
Now Ralph knows what Piggy has always known: Jack hates Ralph (though obviously Jack cannot even articulate why because he cannot answer Ralph's simple question) and will do whatever he must to get rid of him. This realization (epiphany) changes the way Ralph leads for the rest of the novel. He does not trust Jack and knows that, even though it is not Ralph's choice, Jack is not just another boy on the island but a deadly adversary.