Shivaratri is also known “Mahashivaratri”, which is one of the major festivals celebrated in Nepal as well as in India and literally means “Night of the Shiva”. Shivaratri is celebrated on the night of Falgun Krishna Chaturdasi under Hindu Lunar Calendar (month of February or March according to the English calendar) to worship Shiva Lingam to make happy the Lord Shiva. Shivaratri is celebrated as birth-night of Lord Shiva. But there are many stories behind the celebration of Shivaratri.
According to the Puranas, during the great mythical churning of the ocean called Samudra Manthan, a pot of poison emerged from the ocean. The gods and the demons were terrified, as it could destroy the entire world. When they ran to Shiva for help, he, in order to protect the world, drank the deadly poison but held it in his throat instead of swallowing it. This turned his throat blue, and because of this he came to be known as 'Nilkantha'. NilKantha in Sanskrit is one with blue throat.
Shiva protected the world from the dangerous poison; therefore, people started celebrating the day as Shivaratri and thanking Shiva for shaving the world.
It is believed Lord Shiva married Goddess Parvati on this day. Some places, Shivaratri is observed as marriage anniversary of Shiva-Parvati too.
A legend explains the all-night worship of Shiva on Shivaratri. There was once a poor tribal man who was great devotee of Shiva. One day he went deep into the forest to collect firewood. However, he lost his way and could not return home before nightfall. As darkness fell, he heard the growls of wild animals. Terrified, he climbed onto the nearest tree for shelter till day-break. Perched amongst the branches, he was afraid he would doze and fall off the tree. To stay awake, he decided to pluck a leaf at a time from the tree and drop it, while chanting the name of Shiva. At dawn, he realized that he had dropped a thousand leaves onto a Linga to keep himself awake, the tribal plucked one leaf at a time from the tree and dropped it below which he had not seen in the dark. The tree happened to be a wood apple or bel tree. This unwitting all-night worship pleased Shiva, by whose grace the tribal was rewarded with divine bliss. This story is also recited on Mahashivaratri by devotees on fast. After observing the all-night fast, devotees eat the Prasad offered to Shiva.
There is another possible reason for the origin of the all-night worship. Being a moonless night, people worshipped the god who wears the crescent moon as an adornment in his hair, Shiva. This was probably to ensure that the moon rose the next night.
Shivaratri is also celebrated marking the convergence of Shiva and Shakti. Shivaratri also celebrates the night when Lord Shiva performed the "Tandav", the cosmic dance, which isthe heavenly dance of Creation, Preservation and Destruction. Devotees chant “Om Namah Shivaya” and “Mahamritunjaya” ("Great Death-conquering Mantra") all night praying for light over darkness.
Mahashivaratri is thus not only a ritual but also a cosmic definition of the Hindu universe. It dispels ignorance, emanates the light of knowledge, makes one aware of the universe, ushers in the spring after the cold and dry winter, and invokes the supreme power to take cognizance of the beings that were created by Lord Shiva.