During the Third Age of Middle-earth, the White Council, or ‘The Wise’ (made up of the Istari and Elven High Chiefs) became aware of an evil force emanating from an ancient fortress on the outskirts of Mirkwood known as Dol Guldur (“Hill of Sorcery”). This evil was known as The Necromancer, although the White Council later suspected that this evil force may have been the return of Sauron, the Chief Lieutenant of Morgoth (the source of all evil and darkness in Middle-earth).
Sauron had been weakened during the War of the Last Alliance, when the One Ring was taken from him by Isildur, and was unable to take corporeal form. He fled Mordor and established a new stronghold at Dol Guldur.
It was only after Gandalf the Grey travelled to Dol Guldur that he was able to confirm that the Necromancer was indeed Sauron. Gandalf reported his discovery to the rest of the White Council, who used their considerable power to drive the Necromancer out.
After his expulsion from Dol Guldur the Necromancer/ Sauron fled back to Mordor and began to assemble an army in his attempt to dominate Middle-earth.
The Necromancer is only mentioned in ‘The Hobbit'; he does not actually make an appearance in the book.