In Varanasi, people visit nearby temples of Shiva and offer prayers in large numbers. The prayers and worship continue late into the night. On Mahashivaratri, devotees offer milk, Bhang, Dhatura, flowers, coconut, fruits etc to Shiva statues and Shiva Lingams and sing bhajans in honor of Shiva. They also recite shlokas (verses) from scriptures, offer prayers in the morning and evening and many devotees observe fasting throughout the day. On the day of Mahashivaratri, the main center of religious activity and worship at Varanasi is the Kashi Vishvanath temple, where devotees throng in large numbers to offer prayers to the residing deity of Varanasi, Lord Shiva.
In Hindu mythology, there are many popular stories regarding the origin of Mahashivaratri. One legend traces the origin of Mahashivaratri festival to the churning of the Ocean of Milk by Devas (Gods) and Asuras (demons). According to it, when both Gods and demons were churning the Ocean of Milk to obtain amrita (water of immortal life), they came across many unusual substances, including the deadly poison. The moment they touched the poison, it exploded into poisonous fumes that threatened to envelope the entire universe by darkness. Seeing the destruction of the universe inevitable, the Gods went to Brahma and Vishnu, but none was able to help and as a last resort they went to Lord Shiva, who condensed the fumes by his trident. To save the Universe from destruction, Lord Shiva swallowed the poison, which left a dark blue mark on Shiva's throat.