The first riddle in Macbeth is found in Act 1, Scene 1. The witches meet and the discussion foreshadows the upcoming events of the play.
Fair is foul, and foul is fair.
Hover through the fog and filthy air. (Act 1, Scene 1, p. 8)
The purpose of this riddle is to tell us that things are not what they seem in this play. Good is bad, and bad is good. We cannot really know.
This idea of something being so and not so at the same time is repeated throughout. In Act 5, Macbeth is given several warnings that do not seem to make sense. The third apparition is a child wearing a crown and carrying a small tree. The apparition has a strange message for Macbeth.
Be lion-mettled, proud, and take no care
Who chafes, who frets, or where conspirers are:
Macbeth shall never vanquish’d be until
Great Birnam Wood to high Dunsinane Hill
Shall come against him. (Act 5, Scene 1, p. 60)
Like the other messages, this one is just plain odd. It seems to contradict itself. It tells Macbeth that he is safe, and should be proud and not worry. But although it tells him he won’t be vanquished first, it then tells him that when Birnam Wood comes to Dunsinane he is doomed. Macbeth assumes he’s safe. After all, how can a forest move? The answer is actually in the tree the child is holding. Malcolm has his soldiers cut down branches to hide themselves.
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 5, Scene 4, p. 83)
Malcolm’s trick is foreseen by the witches, and they warn Macbeth. It is a riddle though, and he apparently cannot solve it. He assumes he is safe, and in his hubris does not take precautions. The other riddles similarly predict doom for him and warn him where it’s coming from.
The use of foreshadowing the future through the witches' riddles allows Shakespeare to keep the melodramatic mood of the play. The viewer or reader knows that danger is coming. Can the reader figure out the riddle? Macbeth does not seem to want to.
The witches use the riddles in a few ways. They predict Macbeth's furture (and this in turn fuels his desire to be king and the subsequent killing spree that he and Lady Macbeth pursue). When one prophesy in the form of a riddle comes true, Macbeth is motivated to move forward because he believes what the witches predicted.
The witches let Macbeth know that he will rise in power, however, becasue the riddles are vague, Macbeth is mislead in some ways. He beleves that his power and life cannot be destroyed by anyone. Therefore, the witches are, in a sense, manipulating Macbeth to fulfill his "destiny".
In Act 1, Scene 3 the witches confuse Macbeth by saying Thou shalt get kings, though thou be none' and compare him to Banquo by saying "Lesser than Macbeth, and greater" and ,Not so happy, but much happier".
In Act 4, scene 1, Macbeth returns to the witches and demands more information. He learns that "none of woman born shall harm Macbeth" and therefore he believes he is safe.
MacDuff, however, was born via a c-section (he was ripped from his mother's womb) and therefore he is able to take Macbeth's power and life.
Because of the witches, Macbeth actively pursues a corrupt life and climb to power. While he believes it is his destiny(fate), the prophesies have actually lead him to choose to become evil (free will).