Macbeth is feeling confident because he has been given the prophecy that man born of woman cannot kill him. This prophecy gives Macbeth the courage to go to battle against Malcolm and macduff. Macbeth even brags or boasts to Macduff that man born of woman cannot kill him:
You’re wasting your efforts.
You may as easily slice the air that cannot be cut
With your keen sword as make me bleed.
Let your blade fall on weaker heads;
I have a charmed life, which must not yield
To one given birth to by a woman.
Upon hearing this, Macduff becomes a bit boastful himself. Macduff reveals in a triumphant manner that he himself was not born of woman:
Lose hope of your charm;
And let the genius whom you still have served
Tell you, Macduff was from his mother's womb
Delivered by caesarean section.
When Macduff reveals this bit of information to Macbeth, one can imagine all the color flowing out of Macbeth's face. He is immediately in fear of Macduff. He had not thought about the possibility of Macduff being born of cesarean birth.
Macbeth loses his confidence. He realizes he is about to die at the hand of Macduff. Macduff will have his revenge for Macbeth killing or having Macduff's family killed. Macbeth's courage fled as he faced combat with Macduff. Macbeth became a coward. He lost all confidence in the prophecies that actually destroyed him. Macbeth declares he will not fight Macduff:
Curse you for telling me that,
Because it has intimidated my better part of man!
And let these deceitful fiends be believed no more,
That trick us with double meanings,
That keep the word of promise to our ears,
And break it to our hopes! I will not fight with you.
Macduff will not take no for an answer. He will have his revenge. He separates Macbeth's head from his shoulders and carries the head triumphantly to show it to Malcolm.