In 'Macbeth', the forest that appears to move toward Dunsinane is Birnam Wood.
The moving forest comes from the witches' prophecy in Act IV. Macbeth is told that he will not be defeated until “Great Birnam Wood” comes to high Dunsinane Hill, where his castle stands. He interprets the prediction literally and assumes that a forest cannot move, making him overconfident about his safety.
In Act V, Malcolm's army camps at Birnam Wood on its approach to Macbeth's stronghold. Malcolm orders each soldier to cut down and carry a tree branch as camouflage. From Dunsinane, Macbeth's watchers see the advancing army obscured by greenery, creating the appearance that the wood itself is moving.
The prophecy is fulfilled through strategy rather than magic. This is one of Shakespeare's classic examples of equivocal language: the witches speak truthfully, but Macbeth misunderstands the condition. Birnam Wood is not Cawdor Forest, Inverness Forest, or Forres Wood. The scene also draws on Scottish historical tradition associated with the eventual Battle of Dunsinane.