This form of the deity is featured in a Puranic legend in which he destroys the three cities of the asuras, called Tripura, with a single arrow.
[1] According to the Padma Purana, the asura Taraka had three sons named Tarakaksha, Kamalaksha (or Virayavana), and Vidyunmali.
These asura princes performed severe penance towards the creator-god Brahma and obtained the boon of immense power.
Brahma, on being pleased with them, presented each of them with an aerial fortress revolving in the sky, one each of gold, silver, and iron built by Mayasura.
[2] The boon granted the provision that they would reign for a millennium and could be destroyed only by an arrow that could merge the three forts into one, and set them ablaze.
The asuras well-entrenched in their aerial cities would mount attacks on the devas (gods) and the rishis (sages), and harass them.
[3] Seeing that the asuras had engaged in sin, Shiva created a bow and an arrow and a chariot with the various gods and goddesses and components of the universe.
His chariot was the earth itself, his wheels were the sun and the moon, his bow was Mount Meru with Vasuki was its string.
[4] Shiva immediately regretted his decision to release the arrow, since he had forgotten to protect Maya, a great devotee of his.
Then returning he offers the Upasad libation; verily having driven away his foes from these worlds and having conquered he mounts upon the world of his foes.Saiddhantika Non - Saiddhantika Stella Kramrisch's full analysis of the Tripurasamhara episode appears in Chapter XI.3 of her book, The Presence of Siva [Princeton University Press, 1981], in the section on "Cosmic Demons.