In Act I, scene ii the magic of Prospero and the witch Sycorax are starkly contrasted. Sycorax used magic for evil purposes, imprisonling Ariel for twelve years in a "cloven pine." It is even speculated in the story that Sycorax has the devil himself behind her magic. Prospero, on the other hand, uses his magic for good. He frees Ariel from his prison and tries to help him.
In Act V, scene i Prospero discusses with Ariel how magic is best used in virtue, or in honest situations, rather than in vengance, or for moraly reprehensible reasons driven by anger, fury, or revenge.
"Yet with my nobler reason 'gainst my fury
Do I take part: the rarer action is
In virtue than in vengeance: they being penitent,
The sole drift of my purpose doth extend
Not a frown further. Go release them, Ariel.
My charms I'll break, their senses I'll restore,
And they shall be themselves."