Do not meddle in the affairs of wizards, for they are subtle and quick to anger.
― Gildor Inglorion
The Wizards of Middle-earth, also known as the Istari in Quenya and the Ithryn in Sindarin, were a small group of beings outwardly resembling Men but possessing much greater physical and mental power.
History
The wizards, also called Istari, were originally spirits of the order of the Maiar, the followers of the Valar. These were sent by the Valar to help and assist the peoples of Middle-earth against Sauron as he gathered his forces during the Third Age.
The five known Istari were Curumo, a Maia of Aulë, Olórin, a Maia of Manwë and Varda, Aiwendil, a Maia of Yavanna, and Alatar and Pallando, both Maiar of Oromë. Alatar and Pallando, also known as Ithryn Luin, the 'Blue Wizards,' went into the East and do not come into the main tales of Middle-earth. In the northwest of Middle-earth Curumo became known as Saruman to Men and Curunír to Elves, Olórin was known as Gandalf to Men and Mithrandir to Elves, while Aiwendil became known as Radagast.
The Istari came to Middle-earth around the year T.A. 1000 (though the Blue Wizards may have arrived much earlier). Each wizard was assigned a colour for his clothes, white being indicative of the chief. The two that traveled to the East wore sea-blue robes, hence their name Ithryn Luin, the 'Blue Wizards.' Similarly the other wizards also became known by their colours, being referred to as 'Saruman the White,' 'Gandalf the Grey,' and 'Radagast the Brown.' It is not known if the colour had any special meaning concerning their rank, abilities or nature.
They were clothed in the bodies of old men, restricting their powers so that they would only assist the peoples of Middle-earth and not seek domination like Sauron had, who was also a Maia. They were charged by the Valar to assist the people of Middle-earth through persuasion and encouragement, not force or fear. By inhabiting the bodies of Men they also became susceptible to all of the weaknesses of a physical body: they felt hunger, pain, greed, sorrow, joy, and all other emotions and pains of Men.
Their spirits remained immortal, and they aged only very slowly. However, their bodies could be killed: Gandalf did indeed die from his duel with the Balrog of Moria, and only through the intervention of Eru himself was he restored to his body.
Very few of Middle-earth's inhabitants knew who the Wizards really were; the Istari did not share this information. Most believed they were Elves or wise Men (Gandalf represents this interpretation, meaning Wand-elf, because the Men who gave him the nickname believed he was an Elf). They attracted few questions due to their gentle nature and dislike of direct interference with other people's affairs. In spite of their specific and unambiguous goal, the Wizards were nevertheless capable of mortal feelings, thus Gandalf felt great affection for the Hobbits. On the other hand, they could feel negative mortal emotions like greed, jealousy, and lust for power. Saruman himself fell victim to these emotions, and it is hinted in an essay in Unfinished Tales that the Blue Wizards (see below) may have also fallen prey to these temptations during their journeys in the East.
Saruman was originally gifted with the greatest power of the five Istari and was named the head of the White Council, a group of the Wise in opposition to Sauron. In T.A. 2759, he was invited by the rulers of Gondor and Rohan to settle in Isengard and the impenetrable tower of Orthanc. Saruman was learned in the lore of the Rings of Power, gradually becoming corrupted by the desire for the Rings and by Sauron's direct influence on him through the palantír of Orthanc. Eventually he became ensnared in Sauron's power, and assisted him in the War of the Ring until he was defeated by the Ents and Gandalf, who broke his staff and cast him out of the White Council. Saruman's death came at the hands of his servant Wormtongue in The Shire, after the destruction of the One Ring. His spirit was then dispersed by a wind from the West, becoming similar to Sauron in his destruction.
When Saruman fell to the temptation of the Ring, and after the defeat of the Balrog of Moria, Gandalf was reborn and given the title of Gandalf the White. Gandalf, who had originally been nominated for leadership of the White Council by the Elf-Lady Galadriel, assumed leadership both of the White Council and the Order of the Istari. He then cast Saruman from the order and led the West to victory over Sauron, advising the Ringbearer Frodo and the new king of Gondor Aragorn Elessar. After the defeat of Sauron and Saruman, Gandalf traveled west across the Sea with the Ringbearers, revealing that he himself was the bearer of Narya, one of the Elven Rings of Power.
Radagast stayed true to his mission for a while, even serving as a messenger to Gandalf from Saruman, convincing Gandalf to meet with Saruman. He also instructed the birds in his service to assist Saruman and Gandalf. Radagast dwelt at Rhosgobel near the borders of Mirkwood. Eventually, Radagast is said to have become enamoured of the beasts and birds and to have ultimately failed to complete his mission. Later writings are less critical of Radagast, arguing that he did not fail at his mission as much as simply choose a tactic - working with the animal world - that ultimately proved less directly effective than working with Men and Elves.
The Blue Wizards went into the East and do not come into the tales of northwestern Middle-earth. It is sometimes thought that the Blue Wizards also failed in their mission and fell to the temptations that had corrupted Saruman; it is said that their fall gave rise to magical cults in the East. However, other writings again suggest otherwise, even that the Blue Wizards possibly succeeded in their mission, and that the victories of the West would have been impossible without their influence in the East.
Etymology
Tolkien's Istari were not wizards in the common sense of the word, but rather more like 'wise men' or even 'messengers.' Tolkien, a lifelong philologist and devoted Catholic, deliberately used the word wizard, as it connoted 'wisdom' and conveniently conveyed to the reader the 'other worldly' powers of the characters. These sentiments were best worded by Tolkien himself in the first paragraph of the essay The Istari in the Unfinished Tales:
Wizard is a translation of Quenya istar (Sindarin ithron): one of the members of an 'order' (as they call it), claiming to possess, and exhibiting, eminent knowledge of the history and nature of the World. The translation (though suitable in its relation to 'wise' and other ancient words of knowing, similar to that of istar in Quenya) is not perhaps happy, since Heren Istarion or 'Order of Wizards' was quite distinct from 'wizards' and 'magicians' of later legend; they belonged solely to the Third Age and then departed, and none save maybe Elrond, Círdan and Galadriel discovered of what kind they were or whence they came.
The Quenya word Istari means 'those who know'. The word seems to come from the verb ista- ('to know'), and possibly the agentive ending -ro.
Other Versions of the Legendarium
In Gnomish, one of Tolkien's early conceptions of an Elven language, the word for 'wizard' is curug (and 'witch' is curus). An alternative word is thothweg, also translated as 'wizard'.