Why is the exchange between Lady Macbeth and Duncan in Act 1, Scene 6, lines 25-31, ironic?
In these lines, Duncan asks after Macbeth's whereabouts since Macbeth rode ahead of the king's retinue to alert his household that the king was on his way. Duncan says,
We coursed him at the heels and had a purpose
To be his purveyor; but he rides well,
And his great love, sharp as his spur, hath helped
To his home before us. Fair and noble hostess,
We are your guest tonight. (1.6.26-31)
Duncan jokes that his company followed close behind Macbeth in an attempt to beat him to his castle and announce him as being on his way (rather than the other way around), but Macbeth rode too well to be caught. He says that it was likely Macbeth's great love of Lady Macbeth that drove him to ride so quickly and be able to get there so much sooner than they. He then compliments Lady Macbeth.
These lines are ironic for a couple of reasons: first, Duncan is right in that it was Macbeth's "great love" that made him ride so quickly. But Macbeth didn't just want to come home and see his loving wife. He needed to get there first so that they could conspire together how best to get rid of Duncan before Duncan actually arrived. Second, Duncan calls her a "Fair and noble hostess," failing to realize that she is anything but. She seems fair and noble, knowing exactly how to behave, how to compliment and honor him, but -- inside -- she is plotting his murder, hardly the behavior of a good hostess. Both are examples of dramatic irony; dramatic irony occurs when the audience knows more than the character, and it is often used to build suspense, leading up to the climax of a text. In this case, it does build tension as we realize just how trusting Duncan is of Macbeth and Lady Macbeth, and how easy it will then be for them to kill him that night.