In Act IV, Scene 1 of "Macbeth," we find out that Macduff has left the castle of Macbeth. He flees because he is afraid that Macbeth will try to kill him.
When Macduff flees, he goes to England. While Macduff is there, Macbeth kills Macduff's wife and children. Macbeth then goes to England to try to kill Macduff as well.
Macduff hears that his family has been killed so he swears to take revenge on Macbeth and joins Malcolm in his attempt to overthrow Macbeth. At the end of the play he ends up killing Macbeth in battle.