At the end of act 3, scene 4 of William Shakespeare's Macbeth, in which the ghost of the murdered Banquo appears to Macbeth at his coronation banquet, the unnerved Macbeth decides to visit the witches who first prophesied that he would be Thane of Glamis, Thane of Cawdor, and "shalt be King hereafter!" (1.3.53). Macbeth is determined to find out what the future holds for him, no matter the consequences.
MACBETH. I will tomorrow,
And betimes I will, to the weird sisters.
More shall they speak; for now I am bent to know,
By the worst means, the worst. (3.4.161-164)
Macbeth further emphasizes this in act 4, scene 1 when he demands that the witches answer his questions.
MACBETH. Even till destruction sicken, answer me
To what I ask you. (4.1.61-62).
The witches agree to tell him Macbeth they know, and after some witchy mumbo-jumbo, they turn over the apparition duties to their "masters" (4.3.67), who know Macbeth's questions even before he asks them.
FIRST WITCH. He knows thy thought:
Hear his speech, but say thou nought. (4.1.76-77)
The first apparition is an "Armed [helmeted] Head." It tells Macbeth. "Beware Macduff; / Beware the Thane of Fife" (4.1.78-80). Macbeth replies, somewhat sarcastically, that he already knows that, "Thou has harp'd my fear aright" (4.1.82), and the apparition disappears before Macbeth can ask it anything else.
The second apparition is "a Bloody Child," which is wholly disconcerting, but the child is bloody from childbirth, not from injury. Equally unsettling, though, is that the child speaks to Macbeth in its own voice and tells him, "none of woman born / Shall harm Macbeth" (4.1.89-90).
This relieves Macbeth's fear of Macduff to a certain extent, but just to be rid of his fear for certain, Macbeth, ever cautious, particularly where the security of his head and crown are concerned, decides to kill Macduff anyway.
MACBETH. But yet I'll make assurance double sure,
And take a bond of fate: thou shalt not live... (4.1.92-93)
The third apparition, another child, this one wearing a crown and holding a tree branch in its hand, tells Macbeth in its child-voice, "Macbeth shall never vanquish’d be until / Great Birnam Wood to high Dunsinane Hill / Shall come against him" (4.1.103-105).
Macbeth is very happy to hear this, and remarks to the witches that he has absolutely nothing to fear from Macduff or his army.
MACBETH. That will never be.
Who can impress the forest, bid the tree
Unfix his earth-bound root? (4.1.106-108)
As far as the witches are concerned, the show is over—"Seek to know no more" (4.1.116)—but Macbeth insists that the witches answer one more question.
MACBETH. Yet my heart
Throbs to know one thing: tell me, if your art
Can tell so much, shall Banquo's issue [descendants] ever
Reign in this kingdom? (4.1.112-115)
Macbeth, apparently thinking that he actually has power over the witches, threatens "an eternal curse" (4.1.118) on them if they don't answer the question about Banquo's descendants.
The witches humor Macbeth and produce a fourth apparition, "A show of eight Kings, and Banquo last with a glass in his hand," which demonstrates the prophecy made to Banquo in act 1, scene 3, "Thou shalt get [beget] kings, though thou be none" (1.3.70).
All of the eight kings in the parade look like Banquo, and Banquo himself holds up a mirror so Macbeth can see Banquo's descendants reflected "out to the crack of doom..." (4.1.130), in other words, "to infinity and beyond."
This is not something that Macbeth is pleased to see. Just to be sure, though, he ask the witches if this apparition is true, and a witch responds, "Ay, sir, all this is so" (4.1.138).
The witches close out the apparition show with a short dance, and then disappear.
The first three apparitions, as well as many other elements of the plot of Macbeth, are drawn from Raphael Holinshed's Chronicles of England, Scotland and Ireland, which Shakespeare used as a source for many other of his historical plays.
The fourth apparition, however, the parade of kings, is entirely Shakespeare's invention.
Shakespeare scholars are fairly certain that Shakespeare wrote Macbeth for King James I, who ascended to the throne of England after the death of Queen Elizabeth I in 1603. Before he became King James I of England, James was King James VI of Scotland. As James I, he ruled both England and Scotland. This is James I's "Scottish connection" to Macbeth.
James was very much interested in witches and witchcraft, and he was notorious in Scotland as a zealous—some would say, fanatically obsessed—"witch hunter." He personally supervised the interrogation of suspected witches, and he attended witch burnings.
James also wrote a book on the subject of witchcraft, Daemonologie, In Forme of a Dialogue, Divided into three Books: By the High and Mighty Prince, James &c., usually shortened simply to Daemonologie. This is James I's "witch connection" to Macbeth.
James I also believed that he was descended from Banquo. The "eight Kings" that appear to Macbeth in the fourth apparition represent the line of kings from Banquo to James I. Macbeth's mention of "two-fold balls and treble sceptre" (4.1.134) refers to James I's double coronation at Scone, in Scotland, and at Westminster in London. These are is James I's "Banquo connections" to Macbeth.
There's no evidence whatsoever to support James contention that he was descended from Banquo, but James wasn't particularly interested in the facts of the matter, which are that Banquo's son, Fleance, didn't become King at Macbeth's death, nor did any other of Banquo's descendants. When Macbeth died, the throne of Scotland passed instead to Macbeth's stepson, Lulach—Lady Macbeth's son by a previous marriage—and Lulach ruled for about eight months before he was killed by King Duncan's son, Malcolm. The line of kings of Scotland descends from Duncan, with a quick sidestep through Lulach, not from Banquo.
Aside from all that, Banquo probably never existed. Banquo is part of Scottish legend that Holinshed included in his Chronicles (Volume 5, at pp. 268-269). After excluding the part in the Chronicles where Banquo assists Macbeth in murdering King Duncan (at p, 269), which wouldn't reflect very well on Banquo or James I, Shakespeare includes Banquo in his play as a foil to Macbeth, and to gratify King James I.
By by the time Shakespeare wrote Macbeth, Shakespeare's acting company, The Lord Chamberlain's Men, had come under the patronage of James I and been renamed "The King's Men." This is James I's "Shakespeare connection" to Macbeth, and it's likely the reason that Shakespeare wrote Macbeth for James I.
On August 7, 1606 the first performance of Macbeth was given in the Great Hall of Hampton Court Palace in London for King James I and his brother-in-law, King Christian IV of Denmark, as recorded in the "Account of the Revels at Court," which notes that Shakespeare's acting company, The King's Men, performed three plays for the Kings James I and Christian IV during Christian's visit to England from July 18 to August 10.