In the fiction of J. R. R. Tolkien, the Wizards of Middle-earth are a small group of beings outwardly resembling Men but possessing much greater physical and mental power. They are also called the Istari ("Wise Ones") by the Elves. The Sindarin word is Ithron.
They came to Middle-earth roughly around the year 1000 of the Third Age to aid the free peoples of Middle-earth against Sauron. They already appeared old when they entered Middle-earth, and aged very slowly. They were sent by the Valar as guides of great deeds, to set in motion the events that would lead to the destruction of Sauron. They were of the Maiar, spirits of the same order of the Valar, but lesser in power. Sauron himself was one of the most powerful of the Maiar.
The Wizards were deliberately "clothed" in the bodies of Men, as the Valar wished them to help the inhabitants of Middle-earth by persuasion and encouragement, not by force or fear. Thus, they were, physically speaking, "real" Men, and felt all the urges, pleasures and fears of flesh and blood. While in this form they could be killed—thus, Gandalf truly dies in the fight with the Balrog, but is "reborn" as his mission is not yet complete.
Very few of Middle-earth's inhabitants knew who the Wizards really were; the Wizards did not share this information. Most thought they were Elves or wise Men. 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 are nevertheless capable of human feelings; thus Gandalf feels great affection for the Hobbits. On the flip side, they could feel negative human emotions like greed, jealousy, and lust for power. It is hinted in the essay in Unfinished Tales that the Blue Wizards (see below) may have fallen prey to these temptations.
There were five who came to Middle-earth. Two of these, the Blue Wizards, went into the East and do not come into the stories of Middle-earth. However, their names are mentioned in the Unfinished Tales: Alatar and Pallando. Their Quenya names were Morinehtar, Darkness-slayer and Romestamo, East-helper, respectively. The other three were called Saruman, also known as Curunír; Gandalf, or Mithrandir; and Radagast. Their Quenya names were Curumo, meaning skilled one; Olórin, meaning rememberer, dreamer, or thinker; and Aiwendil, meaning bird-friend.
Saruman originally had the greatest power of the five Istari and was the head of the White Council. In the year 2759 of the Third Age, he was invited by the rulers of Gondor and Rohan to settle in Isengard. 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.
During the War of the Ring, it was Gandalf who led the Free Peoples to victory over Sauron. He also defeated Saruman. After the destruction of Sauron, Gandalf left Middle-earth and went over the Sea, along with the Ringbearers and many of the Elves.
In the course of The Lord of the Rings, it is never made clear what exactly Gandalf and Saruman are. The essay given in Unfinished Tales was originally begun in order to be included in the appendices of The Lord of the Rings, but was not completed in time.