Dramatic irony is where the audience—or in the case of a book, the reader—knows something that the characters do not. A great example of dramatic irony in Lord of the Flies occurs right at the end of the book when the rescuing naval officer says that he expected the boys to put on a "better show." In other words, he expected that a group of British boys from their social background would've been able to maintain some semblance of order on the island.
In response, Ralph tries to explain to the officer how things went south, but the officer still doesn't get it:
I know. Jolly good show. Like the Coral Island.
This is a reference to a famous children's adventure story, kind of like Lord of the Flies in reverse. In the original story, the children stranded on a desert island act in a civilized fashion, banding together to tame the native "savages." However, unbeknownst to the naval officer, it wasn't like this at all with Ralph and the boys. It was they who were the savages.
An example of dramatic irony is when the “Beast from the Air” turns out to be a dead parachutist.
Dramatic irony is when the reader knows something that the characters do not. It occurs as the reader realizes something is about to happen because we have knowledge that the character does not. Since the story involves children, we know more than they do. We also understand the situation of the war better.
The little boys on the island start a rumor about a beast. The beastie is described in various vague ways, and most boys discount it. However, any shadow or movement will become the beast in this kind of situation.
Part of the dramatic irony comes from the reader being told specifically that the figure is a parachutist.
There was a speck above the island, a figure dropping swiftly beneath a parachute, a figure that hung with dangling limbs. The changing winds of various altitudes took the figure where they would. (Chapter 6)
We know that the figure is likely dead (it has “dangling limbs” and is just hanging there), and we know that it is moving because of the wind. Naturally a boy who saw it would be frightened though, with images of the beast in mind and an unexpected visitor—dead no less. Samneric, and later Simon, see the parachutist as what they expect it to be. The reader knows that imagination and suggestion are powerful forces, especially for kids, and especially in such difficult and dangerous situations.