As per the legend mentioned in the religious texts, the Shiva Mahapurana. Lord Brahma, the creator of the Universe and Lord Vishnu, the sustainer of the Universe, were arguing about which one of them was Supreme. Both of them then choose to call in the four Vedas to settle their dispute.
The Vedas, however testified that neither Brahma nor Vishnu, but Shiva is supreme. As the two stand in disbelief, a huge column of fire splits the earth and blazes through the sky to pierce the heavens. Astounded Brahma and Vishnu decide to find the extent of the source and end of this brilliant column of Light. Vishnu becomes a boar and burrows deep into the netherwoods.
Brahma mounts on his goose and flies high up as the heavens. But even after thousand of years they cannot find the top or the bottom of the pillar of light. When they return back to the starting point. Shiva asks Vishnu whether he has seen the end point of the pillar.
Vishnu admits to having not seen the end of the light, But Brahma lies about having seen the top point of the pillar of light. Seeing this Lord Shiva gets angry and strips Brahma of his powers cursing him that he would have no place in any of the religious ceremonies and no temples will be built for him while Vishnu would be worshipped till the end of universe.
The JyotirLinga shrines, thus are places where Shiva appeared as a fiery column of light Originally it was believed that there were 64 JyothirLingas, only 12 are considered highly sacred. The twelve JyothirLingas sites take the name of the presiding deity. The core is the lingam which represents the formless,infinite nature of Shiva.