Theipirai ashtami is a special day for Lord Bhairava. What's the story behind Lord Bhairava.
Bhairava or Kal Bhairava is the fierce destructive form of Lord Shiva and is especially associated with the city of Kashi and Tantra vidya. The Kurma Puran mentions the story of the creation of Kal Bhairava:
Many years ago, Brahma lost his head slightly. He began to imagine that he was superior to Shiva and Vishnu. He told all the sages, “I am the supreme godhead. There is no one else but me.” While Brahma was thus instructing the sages, Vishnu arrived and was enraged at Brahma’s behaviour. “You are indeed ignorant,” he told Brahma. “I am the supreme godhead. You are only the creator. But I am, after all, the preserver.”
While Vishnu and Brahma were thus arguing the four Vedas adopted animate forms and appeared before them. Each of the Vedas tried to persuade Brahma and Vishnu that Shiva was superior to both of them. Vishnu was persuaded by this reasoning, but Brahma was not. He told the Vedas, “You must be joking. How can Shiva be superior to the two of us? He is always wandering around with ghosts and demons for companions.”
While all this was going on, who should arrive but Shiva? Brahma promptly proceeded to insult Shiva. Shiva then created a being named Kalabhairava from his own body and Kalabhairava started to fight with Brahma. In those days, Brahma used to have five heads. In course of the fighting, Kalabhairava chopped off one of Brahma’s heads. Ever since that day, Brahma has had four heads and four faces.
The Shatrudra Samhita of the Shiva Maha Puran mentions the following story about Bhairava which shows how he came to be associated with the city of Kashi:
Bhairav who was created by lord Shiva from his third eye, had severed one of the five heads of Lord Brahma on the instruction of lord Shiva. Now Brahmaji was left with only four heads. Carrying the skull of Brahma in his hand, Bhairava started wandering in all the three worlds. To atone his sin of severing the head of lord Brahma, he was begging alms. Bhairav reached Vishnuloka where he was welcomed warm heartedly by lord Vishnu and Laxmi. Goddess Laxmi dropped the learning (Vidya) named Manorath (by which all the wishes could be fulfilled) in the begging bowl (Skull) of Bhariav. Bhairav became extremely happy by this gift. Lord Shiva had created a oegrass named 'Brahmahatya' and had instructed Bhairav to reach Kashi, before her. According to lord Shiva this way the sin committed by Bhairav could successfully atoned.
After being blessed by goddess Laxmi, Bhairav took the permission of Lord Vishnu and proceeded towards Kashi. When Bhairav reached Kashi, Brahmahatya too came near the outskirts of the city, but could not enter it because of Lord Shiva's power instead she entered in to the netherworld (Patal loka). As soon as Bhairav had entered Kashi the begging-bowl (skull) fell on the ground and thus Bhairav got liberated from his sins. Bhairav was extremely relieved. The place where the skull of Brahma had fallen, later on became as Kapal mochan- the most sacred place of pilgrimage.
In the Kala Bhairav Ashtakam by Adi Shankracharya, Kala Bhairava is described as the overlord of Kashi and his dark, naked body is covered with snakes and garland of skulls. He has three eyes, weapons for punishment in four hands, with shining golden bells attached to his waist-belt.
देवराजसेव्यमानपावनांघ्रिपङ्कजं व्यालयज्ञसूत्रमिन्दुशेखरं कृपाकरम् । नारदादियोगिवृन्दवन्दितं दिगंबरं काशिकापुराधिनाथकालभैरवं भजे ॥१॥
I salute Kalabhairava, the lord of the city of Kasi, Whose lotus like feet is being served by Devendra, Who is merciful and wears the moon on his forehead, Who wears a snake as his sacred thread, Who wears the different directions as his cloth, And who is worshipped by sages like Narada.
भानुकोटिभास्वरं भवाब्धितारकं परं नीलकण्ठमीप्सितार्थदायकं त्रिलोचनम् । कालकालमंबुजाक्षमक्षशूलमक्षरं काशिकापुराधिनाथकालभैरवं भजे ॥२॥
I salute Kalabhairava, the lord of the city of Kasi, Who shines like billions of suns, Who helps us cross this miserable ocean of life, Who is supreme and has a blue neck, Who has three eyes and grants us our desires, Who is the death to the God of death, Who has lotus flower like eyes, Who has the undefeatable trident, And who does not have decay.
शूलटङ्कपाशदण्डपाणिमादिकारणं श्यामकायमादिदेवमक्षरं निरामयम् । भीमविक्रमं प्रभुं विचित्रताण्डवप्रियं काशिकापुराधिनाथकालभैरवं भजे ॥३॥
I salute Kalabhairava, the lord of the city of Kasi, Who has a spear, a chord and a stick as weapons, Who is black in colour and the primeval cause, Who is deathless and the first God, Who is free from decay and ill health, Who is the Lord who is a great hero, And who likes the special vigorous tandava.
भुक्तिमुक्तिदायकं प्रशस्तचारुविग्रहं भक्तवत्सलं स्थितं समस्तलोकविग्रहम् । विनिक्वणन्मनोज्ञहेमकिङ्किणीलसत्कटिं काशिकापुराधिनाथकालभैरवं भजे ॥४॥
I salute Kalabhairava, the lord of the city of Kasi, Who fulfills desires and also grants salvation, Who is well known for his pretty mien, Who is a form of Shiva, Who loves his devotees, Who is the God of the entire world, Who assumes various forms, And who has a golden waist thread, On which jingling bells are tied.
धर्मसेतुपालकं त्वधर्ममार्गनाशकं कर्मपाशमोचकं सुशर्मदायकं विभुम् । स्वर्णवर्णशेषपाशशोभिताङ्गमण्डलं काशिकापुराधिनाथकालभैरवं भजे ॥५॥
I salute Kalabhairava, the lord of the city of Kasi, Who maintains the bridge of dharma in life, Who destroys paths which are not right, Who saves us from the ties of Karma, Who is the lord who makes us ashamed, When trying to do wrong things, Who has a shining body because of golden rope, With bells tied in various places.
रत्नपादुकाप्रभाभिरामपादयुग्मकं नित्यमद्वितीयमिष्टदैवतं निरंजनम् । मृत्युदर्पनाशनं करालदंष्ट्रमोक्षणं काशिकापुराधिनाथकालभैरवं भजे ॥६॥
I salute Kalabhairava, the lord of the city of Kasi, Who has feet adorned by the shine of gem studded sandals, Who is eternal and does not have any one second to him, Who is our favorite God who bestows everything, Who takes away the fear of death from humans, And who grants them salvation by his terrible teeth.
अट्टहासभिन्नपद्मजाण्डकोशसंततिं दृष्टिपातनष्टपापजालमुग्रशासनम् । अष्टसिद्धिदायकं कपालमालिकाधरं काशिकापुराधिनाथकालभैरवं भजे ॥७॥
I salute Kalabhairava, the lord of the city of Kasi, Whose loud roar is enough to destroy all those created by Brahma, Whose sight is sufficient to destroy all sins, Who is crafty and strict ruler, Who can grant the eight occult powers, And who wears the garland of skulls.
भूतसंघनायकं विशालकीर्तिदायकं काशिवासलोकपुण्यपापशोधकं विभुम् । नीतिमार्गकोविदं पुरातनं जगत्पतिं काशिकापुराधिनाथकालभैरवं भजे ॥८॥
I salute Kalabhairava, the lord of the city of Kasi, Who is the chief of the society of Bhoothas, Who grants broad based fame, Who is the lord who judges good and bad deeds, Of those who live in Varanasi, Who is an expert in the way of righteousness, And who is eternally old and lord of the universe.
कालभैरवाष्टकं पठंति ये मनोहरं ज्ञानमुक्तिसाधनं विचित्रपुण्यवर्धनम् । शोकमोहदैन्यलोभकोपतापनाशनं प्रयान्ति कालभैरवांघ्रिसन्निधिं नरा ध्रुवम् ॥९॥
Those who read this enticing octet on Kalabhairava, Which is the source of eternal knowledge, Which increases the effect of righteous deeds, And which destroys grief, passion, poverty, want and anger, Would surely reach the holy presence of Kalabhairava.
As we see from the above verses, Kalbhairava's dreadful laughter shatters the entire creation and he is the one who performs the Tandava or the dance of destruction thereby once more confirming his nature as the fierce, destructive form of Lord Shiva.