This could have been some evil magic from the Sisters directed at Macbeth to ensure his murder of the King. Or it could have just been stress getting to Macbeth and causing him to hallucinate. There is no explanation presented in the play swaying in support of either argument. This also raises the question of, "what effect was the dagger supposed to have on Macbeth?" Was this some sort of final stimulus to turn him from "cowardly conspirator" to "treasonous murderer"? This could have been his final chance to turn back, but the blood on the knife pointing to Duncan's door seemed to symbolize the inevitability of the King's death. Macbeth questioned the origin and the palpability of the knife, but never mentions that he still could have just turned away and let Duncan sleep undisturbed. .
The second sighting was when Macbeth was throwing a banquet right after he had orchestrated the murder of Banquo. Just before taking his seat at the head of the table Macbeth sees that his seat is already occupied by Banquo's ghost; but Macbeth is the only one in the crowd who can see the ghost. Macbeth starts to panic and yells at the ghost frightening his dinner guests as they see their new king talking to an empty chair and start to question his sanity. Macbeth is meanwhile proclaiming how he had nothing to do with the murder of Banquo. This vision serves no purpose other than to drive Macbeth further into a state of paranoia and fear. Banquo soon disappears just as quick as he had come with no mention from other guests as to seeing what Macbeth had seen.
The last few apparitions all occur under the guise of the evil witches. As times get tense Macbeth goes to the witches to learn of his fate. He is welcomed by the witches lead by Hecate, who we assume to be the most evil of them all. There is a series of apparitions that rise from a boiling cauldron made by the witches foretelling Macbeth's future with ambiguity.