Out of his powers Vishnu created a man. This man's head was shaven, his clothes were faded and he carried a wooden water-pot in his hands. He approached Vishnu. "What are my orders?" he asked Vishnu.
"Let me explain to you why you have been created", replied Lord Vishnu. "I will teach you a religion that is completely against the Vedas. You will then get the impression that there is no Svarga (heaven) and no Naraka (hell) and that both heaven and hell are on earth. You will not believe that rewards and punishments for deeds committed on earth are meted out after death. Go to Tripura and teach the demons this religion, by which they will be dislodged from the righteous path. Then we will do something about Tripura".
The being did as he had been asked to. He and four of his disciples went to a forest that was near Tripura and began to preach. They were trained by Vishnu himself. Therefore, their teachings were convincing and they had many converts. Even the sage Narada got confused and was converted. In fact, it was Narada who carried news of this wonderful new religion to King Vidyunmali. "King" he said, "there is a wonderful new teacher with a wonderful new religion. I have never heard before. I have been converted."
Since the great sage Narada had been converted, Vidyunmali also accepted the new religion, and in due course, so did Tarakaksha and Kamalaksha. The asuras gave up revering the Vedas, they stopped worshipping Shiva linga.
Now the gods then went to Shiva and began to pray to him. When Shiva appeared, they told him that the asuras had now become evil and should be destroyed. They had even stopped worshipping Shiva's linga.
Shiva agreed to destroy Tripura. Vishvakarma was the architect of the gods. Shiva called Vishvakarma and asked him to make a suitable chariot, bow and arrow. The chariot was made entirely out of gold. Brahma himself became the charioteer and the chariot was speedily driven towards Tripura. The gods accompanied Shiva with diverse weapons.
When Shiva's army reached the battlefield, the three forts were about to merge into a single Tripura, which condition would last for just a second. At the exact time, Lord Shiva invoked the most destructive weapon controlled by Him, the Pashupatastra. The Destroyer's capable arms fired a single arrow into the three forts at the exact instant they merged into one, thus burning to ashes the three forts of the asuras. Shiva thus earned Himself the epithet Tripurantaka - the one who ended Tripura. He also earned the epithet Tripurari.
Another version that is widely quoted in Tamil literature has Lord Shiva destroying Tripura with a mere smile. When all the battlefield was filled with warriors, with Brahma and Vishnu in attendance, there occurred the instant when the forts came together. Lord Shiva merely smiled. The forts were burned to ashes. The battle was over before it began! In Tamil, Lord Shiva has the epithet, "Sirithu Purameritha Peruman" which means, He who burnt the cities with a mere smile.
While the celebrations were going on, the shaven-headed religious teachers arrived. "What are we supposed to do now?" they asked.
Brahma and Vishnu told them to go the desert where there are no humans. The last of the four eras was Kali Yuga and in Kali Yuga, evil would reign supreme. When Kali Yuga arrived, they were to come back and begin their teaching afresh. And once they reached at their peak god will take rebirth and will wipe them from earth and once again the world will be free from all kinds of evil and asuras.
https://freeglobaluniversity.blogspot.com/search/label/Tripur