Macbeth's change in character is due to a number of events that we can track during the play, including his wife's words to him, his trust in the witches when their prophecies come true, his becoming drunk with power, and his not thinking clearly due to lack of sleep.
At the start of the play, Macbeth has achieved victory in battle and is rewarded by replacing the now executed Thane of Cawdor. Macbeth doesn't learn about his new title until after he meets the three witches, who hail him as the Thane of Glamis (which he is), Thane of Cawdor (which he has been named without yet knowing), and king hereafter. When Macbeth learns that the witches were correct about his becoming Thane of Cawdor, he wonders:
If chance will have me king, why, chance may crown me,
Without my stir.
Here we see that he is content to wait for this prophecy to come true on its own. His wife, however, thinks differently and convinces him to take matters into their own hands and assassinate Duncan.
Act 1, scene 7 begins with a Macbeth soliloquy in which he ponders the murder plan, and at the end decides "we will proceed no further in the business." It is Lady Macbeth's words that change his mind. She questions his manhood, dares him to do it, and revives his confidence. We see how Lady Macbeth forces a fundamental shift in her husband's character.
After becoming king, Macbeth is obsessed with power. Now that he has the crown, he fears losing it. We can attribute this to a few things. First might be his trust in the witches: his prophecies have come true, so perhaps Banquo's prophecy also will. This leads him to have Banquo and his son killed (although Fleance escapes). We might also consider Macbeth's addled mind, perhaps a result of his lack of sleep—after killing Duncan, he hears a voice that says "sleep no more" and has trouble resting after that.
Macbeth's trust in the witches is also evident by the fact he seeks them out again, where they tell him to "beware Macduff." Macbeth is already suspicious of the Thane of Fife, since Macduff skipped his feast. We see this when he tells the witches "thou hast harp'd my fear aright."
Macbeth decides to attack Macduff's castle due to his own wavering earlier in the play. Macbeth was hesitant to kill Duncan, but his wife convinced him to go through with it. As soon as the witches disappear, Lennox arrives to tell him that Macduff has gone to England, solidifying Macbeth's distrust. This also contributes to Macbeth's decision: he will not waver any more.
Time, thou anticipatest my dread exploits:
The flighty purpose never is o'ertook
Unless the deed go with it; from this moment
The very firstlings of my heart shall be
The firstlings of my hand.