This information is gained from a closer reading of "Lord of the Rings" (it's not clear from the movie), and from other writings of Tolkein.
For a definitive discussion, see the book "The Tolkien Companion" (a book which discusses various characters, places, and things from Tolkien's works). Look up "Wizards" and learn truth of what Tolkien meant them to be.