Introduction
Bhasmasura, "the ash demon", also called Vrikasura in some versions, is an Asura who won from Shiva a dangerous boon: that anything he touched with his hand would be reduced to ashes. He is remembered for the trick by which Vishnu, as Mohini, brought about his own destruction.
This article follows the Puranic tradition. Where a detail differs between texts, the article says so.
The boon
Bhasmasura performed severe austerities to Shiva and was granted the boon he asked for, without Shiva fully considering the danger. To test it, or out of sudden greed for Parvati, Bhasmasura then turned on Shiva himself, intending to touch his head and destroy him, and Shiva fled.
Mohini's trick
Vishnu appeared to Bhasmasura in the form of Mohini, a beautiful enchantress, and offered to dance with him if he would copy her movements exactly. As the dance grew more elaborate, Mohini placed her own hand on her head in a graceful gesture, and Bhasmasura, following without thinking, placed his hand on his own head, and was instantly reduced to ashes by his own boon.
Meaning
The story, told mainly in the Shiva Purana and Bhagavata Purana, illustrates both the danger of a boon granted without foresight and Vishnu's skill in undoing such dangers through wit rather than force.