Prospero makes his amends in the final act (5). Dressed as the wronged Duke of Milan, Prospero reveals himself. He tells Antonio to restore the duke to his rightful position and warns Sebastian against further plots regarding the King.
To Alsonso, who has repented, Prospero reveals Prince Ferdinand and Miranda (who are playing chess.)
Finally, Prospero renounces his bad magic. He invites the King of Naples and his entourage to spend the night at the cave. Lastly, he gives one final order to Ariel before setting the spirit free. He commands him to "calm seas and auspicious gales" so that the return voyage to Naples will be peaceful.
Prospero makes a series of symbolic gestures at the end of the play: he casts off his cloak, and buries his staff "five fadom deep", leading him to say in the epilgue that "what strength I have's mine own". He also frees Ariel, the airy spirit who actually performs acts of magic, from his service.
The artificial nature of his power is represented in the cloak and staff, and the books which lead his enemies to exile him in the first place. At the end of the play, he casts them off to assume a more humane role in the new, restored order.