In addition to the above answer, I would add the following points:
1. In general, both plays follow the 5-Act Structure, although Macbeth is much more aggressive (bloody) and less wordy (half as long):
Act I: Background mystery, suspense
Act II: Conflict
Act III: Turning Point
Act IV: Falling Action
Act V: Climax and Resolution
2. Hamlet is structured as a revenge play, but with a hiatus in the middle. Macbeth uses revenge to achieve its tragic fall, but it is not structured as a play primarily about revenge. After Act I, Hamlet has a clear hero, Hamlet, and villain, Claudius. In Macbeth, however, we have a hero turned villain in Act I. Only later do we meet the hero of the play, Macduff. Macduff will attempt to avenge his king and family's death. So, whereas Hamlet is structured with a huge revenge delay between Acts II and V, Macduff's course of revenge is swift justice.
3. Both plays rely heavily on the supernatural and ghosts. In Hamlet, we have the appearances of the Ghost in Act I, demanding revenge. In Macbeth, we have the Witches' enigmatic commentary on Macbeth's equivocal morality. So, whereas Hamlet's use of the supernatural is very clear in its commands ("avenge me" and "leave her to heaven"), the supernatural language in Macbeth is meant to confuse and blur the lines between good and evil ("fair is foul" / "foul is fair"). Later, in Macbeth, Banquo appears to haunt his killer, Macbeth. He is truly a revenge ghost, as he causes guilt and horror. But in Hamlet, the Ghost is not a revenge ghost; he ironically appears to his own son, not to Claudius. He, therefore, haunts by proxy, using Hamlet to do his dirty work for him.
4. Both plays involve love interests of the tragic heroes committing suicide. In Hamlet, Hamlet is much the villain; he is responsible for causing Ophelia's madness: he berates her and kills her father. In Macbeth, Lady Macbeth's own guilt drives her to madness; Macbeth does not drive her to suicide. Truly, women are victims of male pride, but Ophelia's death seems much more avoidable.
5. Both plays use a low comic relief scene so as to alleviate the tragic tension. In Hamlet, it is the gravediggers scene, Act V. In Macbeth, it is the porter scene, Act III.
6. Hamlet begins "In Medias Res," or in the "Middle of the Action." There is much more backstory, and the Ghost is a kind of prologue whose speech provides much flashback. Macbeth begins before any unnatural murders have been committed. The play is more linear in structure.