Macbeth ends with the battle at Dunsinane Castle, where Macbeth has holed up awaiting the attack from Malcolm, Macduff, and the English forces. We know that Macbeth is in desperate straits, and the few that are fighting for him are of doubtful loyalty:
....none serve with him but constrained things
Whose hearts are absent too. (Malcolm, Act V Scene 4).
However, he still has the emotional reinforcement of the prophecies given him by the Three Witches in Act IV Scene 1: that "none of woman born" will harm him, and that
Macbeth shall never vanquish'd be until
Great Birnam Wood to high Dunsinane Hill
Shall come against him.
The second of these assurances is the first to be destroyed: Malcolm's army decides to use branches of the wood as camouflage:
Let every soldier hew him down a bough,
And bear't before him: thereby shall we shadow
The numbers of our host, and make discovery
Err in report of us. (Act V Scene 4)
Macbeth learns of this to his horror in Act V Scene 5:
I pull in resolution and begin
To doubt the equivocation of the fiend
That lies like truth. “Fear not, till Birnam Wood
Do come to Dunsinane,” and now a wood
Comes toward Dunsinane.
However, he still has one prop to lean on: he will not be killed by any man of woman born. It is only on the battlefield itself that this is pulled away from him, when Macduff faces him and declares,
Despair thy charm,
And let the angel whom thou still hast served
Tell thee, Macduff was from his mother's womb
Untimely ripp'd. (Act V Scene 8)
This resolves the chief lingering question of the play, how the prophecies are to be reconciled with Macbeth's defeat, in an ingenious way -- both turn out to be true, in a way that Macbeth did not suspect.
After Macbeth is killed off-stage and his head brought on in proof, there is a short dénouement or "tidying-up," which takes the form of Malcolm's concluding speech. Here, he confirms that Lady Macbeth has killed herself and declares his intention to recall exiles and generally conduct himself in an exemplary way after being crowned King, signaling the return to normality after the abnormal events chronicled in the play:
....what needful else
That calls upon us, by the grace of Grace
We will perform in measure, time, and place, (Act V Scene 8).
Thus, Macbeth ends with the resolution of the puzzle posed by the last prophecies of the Three Witches, the disposal by death of Macbeth and his wife, and the return of all things to their normal and natural state.