Salagrama, or Shaligrama, are black stones with stripes in the form of symbols associated with Lord Vishnu. Salagrama is considered to be an embodiment of Lord Vishnu. The significance of Salagrama is mentioned in the Puranas and the Mahabharata. There is also a legend behind the origin of Salagrama.
Legend has it that Lord Brahma was saddened when he realized that so many people had strayed from the path of Dharma and had become sinners. Brahma sat in meditation thinking about the unfortunate situation and soon a bead of sweat rolled down from his cheek (Ganda) to form a female child. She was named Gandaki.
Gandaki decided to do penance to restore Dharma. Her intense penance was disliked by Devas (Indra and others) as they realized that she would replace them. The Devas offered her different boons but she did not accept any of the boons. Finally, she agreed to stop the penance, if she was allowed to mother all the Devas.
The Devas said such a boon was beyond their capacity. An angry Gandaki cursed the Devas that they will become worms. The Devas retorted by cursing her to become an inert matter (Jada).
Lord Brahma and Indra approached Lord Vishnu to solve the problem. He agreed to turn the ugly situation into a good one and make use of it for universal benefit.
Lord Vishnu agreed to take the form of stones in Chakra Teertha in Salagrama region in the
Himalayas. He asked the Devas who have been cursed to become worms to migrate to the region and eat into the stones. Gandaki shall become a river in the region enveloping the stones.
There are also numerous other legends explaining the origin of Salagrama.
The most popular legend associated with Salagrama is that a chaste woman had cursed Lord Krishna that he would become a stone. To fulfill the curse, Lord Krishna appeared as Salagrama.