In Macbeth, there are three men who reign as the King of Scotland.
First of all, there is King Duncan. When the play begins, King Duncan is on the throne and successfully thwarts a rebellion by the Thane of Cawdor and his foreign allies. Duncan rules until he is murdered by Macbeth in act 2, scene 2.
After Duncan, Macbeth becomes the king of Scotland. He is not of royal birth but is able to seize the throne in the aftermath of Duncan's death. His rule is characterized by violence and tyranny and is brought to an end when he is murdered on the battlefield in act 5, scene 8, by Macduff.
With Macbeth's death, the throne passes to its rightful heir Malcolm. As the son of King Duncan, Malcolm is the true successor, and he is finally able to take his place on the throne when Macbeth is killed.