The sixth of the jyotirlingas is Bhimashankara.
You know about Rama and Ravana from the Ramayana and you also know that Rama killed not only Ravana, but also his brother Kumbahakarna.
A rakshasa woman named Karkati used to live on the mountains named Sahya. Karkati had been married to Kumbhakarna and her son was named Bhima. One day, Bhima asked Karkati, Mother, whose son am I?
Why do we live alone in this forest?
Karkati said, Let me tell you my sad story. I used to be married to the rakshasa Viradha. But Rama killed Viradha. Later on, Kumbhakarna came and married me here and you were born. Kumbhakarna had promised to take me to Lanka. But he was killed by Rama and I never got to see Lanka. That is the reason we live here alone. We have nowhere else to go.
Bhima was very sorry to hear this story. He resolved to avenge himself on Vishnu because he knew that Rama had been an incarnation of Vishnu. For a thousand years he prayed to Brahma with his hands raised up to the sky. When Brahma appeared, Bhima wished for the boon that he might become very strong. This boon Brahma granted.
The first target of Bhima's attention was the king of Kamarupa. The king's crime was that he was devoted to Vishnu. Bhima attacked the king, stole all his belongings, conquered his kingdom and imprisoned him and his wife. He then proceeded to conquer the rest of the world.
In their prison, the king and his wife started to pray to Shiva. This news was brought to Bhima by the rakshasa guards and Bhima decided to kill the king. He found the king praying before a Shiva linga. When Bhima raised his sword to cut off the the king's head, Shiva appeared from the linga and repelled the sword with his trident. Bhima flung a spear at Shiva, but this too was driven back by the trident. Whatever weapon was used by Bhima, Shiva's trident destroyed them all. Finally, Shiva killed Bhima and all his rakshasa cohorts.
The gods were gratified and they craved that Shiva might always remain in the place in the form of the linga.