What is the role of the witches in Macbeth?
The witches in Macbeth are crucial to the plot in that they provide the often nebulous predictions of Macbeth and Banquo's futures (or fortunes). They tell Macbeth that he is Thane of Cawdor, Thane of Glamis, and will soon be King. To Banquo, they say he will sire kings, but never be one himself.
Macbeth is already Thane (Lord) of Cawdor. He has already been chosen to be Thane of Glamis, but he doesn't know it yet (he finds out soon after this chance meeting with the witches). Because of that prediction, he begins to wonder how and when he'll become king, since the witches clearly know the future. Because he hears the witches' Banquo's fortune, he will turn on him through jealousy, since Macbeth will not himself sire kings. He will soon try to make sure Banquo's fortune does not come true by trying to kill him and his son, Fleance.
An interesting side-note: It is a common theme of plays and literature throughout antiquity of people learning their fates and then trying to change those fates, and this is no different. Macbeth comes to believe the witches' prediction of his fate, and believes that Banquo's is just as true--but he tries to change Banquo's. The problem with this is that fate, but its very definition, cannot be changed. How can Macbeth believe both "fates"--unchangeable destinies--so passionately and at the same time work so hard to change Banquo's without cognitive dissonance?
Anyway, these initial predictions provoke Macbeth and Lady Macbeth to murder King Duncan in their own home, then Macbeth hires murderers to kill Banquo and Fleance (but Fleance escapes...of course!).
In Act 4, Macbeth seeks out the witches again in an attempt to work out how he can defend his ill-gotten kingdom. The first apparition the witches conjure tells him to beware Macduff, the Thane of Fife. This prediction is clear, and he accepts it, even adding that he had suspected as much. The second apparition is less clear: "laugh to scorn / The power of man, for none of woman born / Shall harm Macbeth." Upon hearing this, Macbeth flippantly says that Macduff can live, then, because he has nothing to fear (then adds that he'll kill him anyway, just to make sure). The third apparition predicts something that sounds equally impossible: "Macbeth shall never vanquish'd be until / Great Birnam wood to high Dunsinane hill / Shall come against him." Upon hearing this, Macbeth figures he is impossible to beat, since no one can force a forest to move. Lastly, they show him the long line of kings who would descend from the now-dead Banquo's seed, which upsets him deeply.
This sets up Macbeth for failure, of course. He has Macduff's wife and children murdered (but not Macduff, who has run away to England). Then, even when the army, carrying branches from Birnam wood for camouflage, converge on Dunsinane Castle, proving the last prediction true, Macbeth still thinks himself invincible until--too late--he learns that Macduff was "from his mother's womb / Untimely ripp'd," meaning he was born by C-section, or something similar. The witches, throughout, guide Macbeth's actions and set him up for failure.
They play another role, considering Shakespeare's audience. This play was written for King James I (of King James Bible fame), who made a study of witchcraft and even published a treatise on it (so the witches were a bow to his personal interests). Also, King James I was traditionally thought to descend from Banquo's line. You might think of this as Shakespeare kissing up a bit to his new king.