Macbeth's "madness" begins in the very first scene he shows up. In Act I, Scene III, he and Banquo come across the three witches, who give them a strange prophecy. When Macbeth learns that he is destined to be Thane of Cawdor and King of Scotland, he begins to wildly imagine and fantasize about this. And when the nobleman Ross comes to give them the news that the old Thane of Cawdor will be executed for treason and Macbeth has been named the new Thane of Cawdor, Macbeth's fantasies start going even crazier. He can't believe that one of the prophecies, which seemed improbable, has actually come true. He begins talking to himself, muttering crazily, and going into a kind of trance. Banquo notices how Macbeth has become "rapt" (in deep thought). He has retreated into his own mind, and his ambition is growing wildly.
Act III, Scene IV, in which he imagines that he sees Banquo's ghost, is the culmination of his madness. Lady Macbeth nervously tells the party guests that he has a form of epilepsy to stop him from revealing anything about the murders, but Macbeth continually becomes crazier and crazier. His cruel actions and subsequent regrets feed into this.