Xoanon is from the episode "Face of Evil" and is the god of the Tesh and the Sevateem. When the Doctor arrives and meets the Sevateem he is named as "The Evil One" who they believe, along with the Tesh is holding their god prisoner. Since there is a glowing, floating head that looks just like him terrorising the Sevateem and his face has been carved into a mountain, it's not such a jump.
Xoanon is actually an artificial intelligence with multiple personalities. He was the computer of the Mordee expedition, a human exploration team, which landed on the planet. He was designed to guide them, but he broke down. Generations of teams repaired him, eventually evolving him so far that he became concious and a living creature.
This is where the Doctor came in the first time, arriving and helping with repairs just after the new being's birth trauma. He failed to see what it was and thought the data-core was damaged and helped to repair it by making a direct link to his brain. Then he forgot to wipe his mental print from the core, giving Xoanon multiple personalities. (According to the novelisation of the episode, this actually happened during the episode Robot, while the Doctor was still confused from regenerating, hence his big mistake and his very unstable mental print).
Xoanon then set the Tesh and the Sevateem, actually the Technicians and Survey Team from the ship, against each other to reflect his own warring psyche.
In the end the Doctor manages to wipe his pattern from the data-core, thus restoring the real Xoanon who offers to help the tribes of the Tesh and the Sevateem now that he is sane.
Sources: Tardis Data Core | Wikipedia Villains | Wikipedia Ep | TVTropes
Do you like stories of Artificial Intelligence gone mad? Which is your favourite?
We will also give you 2 FREE ebooks just for signing up.