Dramatic irony is a device used by Shakespeare to increase the drama and tension in his plays, where a character is unaware of a crucial bit of information of which the audience themselves are aware.
In Macbeth, Shakespeare makes use of dramatic irony in a significant way, as the thane of Cawdor, a traitor, has been executed but the manner of his death is important in an honor-bound masculine society.
Macbeth takes on the title of the thane of Cawdor, a man who was a traitor, and himself is plotting something which he wants to keep hidden.
Duncan heaps praise on Macbeth for his part in the battle, almost to the point of embarrassment, and Macbeth responds in short, basic language, showing that he's not on the same wavelength as Duncan.
Duncan names his son Malcolm as his successor, effectively sealing his fate as Macbeth believes he has no choice but to kill Duncan to be king.
Macbeth admits that he will need to do something terrible to become king, and asks the stars to not shine light on his plans.