Dramatic irony occurs when the audience or the reader knows something important that a character in a play does not know.
For instance, the first lines of Act 1, scene 6 present an excellent example of dramatic irony; Duncan is commenting on the appearance of Macbeth's castle and says,
This castle hath a pleasant seat. The air
Nimbly and sweetly recommends itself
Unto our gentle senses.
What is ironic about this is that Duncan thinks that Macbeth's castle is pleasantly inviting, but we, the audience, know that within the walls of this castle await Macbeth and Lady Macbeth who intend on murdering the king, so to the viewer of this scene, the castle is not pleasantly inviting, but instead one that is shrouded by gloomy clouds and vultures soaring above. It is a death trap.
Another excellent example of dramatic irony can be found in what the Porter says in Act II, scene iii. Macbeth has already murdered Duncan, and he hears a knocking at the "south entry" of the castle; he and Lady Macbeth go off to bed to "beguile the time." The Porter, unaware of what has occurred, goes to open the door, but what he says is extremely ironic, for he states that
If a man were porter of hell gate, he would have old turning the key.
What he means is that a man portering the gates would grow old opening it because so many people would be entering it. But what is extremely ironic is that the porter does know that he is symbolically portering the gates of hell, the hell that Macbeth and Lady Macbeth have created by murdering King Duncan.
Now, see if you can find some on your own.