The Computer was built by the Masters of Karn to control the machinery in the Citadel, being notably ordered to obliterate any who enquired after the Crystal of All Power. It remained active throughout the centuries after the fall of the Masters, and reported to the Doctor that no other living thing had passed his defensive force field in a thousand years when the Time Lord did so.
The Computer and the Doctor then held a conversation, during which the Doctor asked the Computer about the Crystals. Revealing its previous order, the Computer set in motion a deadly mechanism meant to kill the Doctor and its companions. However, the Doctor chastised the Computer for continuing to follow the bellicose orders of the Masters of Karn long after their civilization's passing. The Computer retorted that the Grandmaster of Karn still lived, after a fashion, in the Great Hall, and added that he took the Grandmaster's lack of canceling the old orders to mean they were still applicable.
The Doctor argued some more, but the Computer would not see reason; the Doctor then resorted to trickery, claiming that he was more intelligent than the Computer (hence why their conclusions on the matter of interpreting the Masters' orders differed). To prove this, the Doctor claimed that he could parse the logic of the Liar's Paradox. Desperate to prove his superior intellect, the Computer pulled all of its processing power into solving this impossible riddle, thus cutting off power to the processing death trap — long enough for the Doctor and his companions to escape.