Ocean churning is one of the enormous events according to our Hindu scriptures, it was about the dispute between Deamons and the Deities for the power and boon of immortality by the elixir(Amrut). Elixir came out from the churning, it was decided whatever comes out of the ocean would be divided among them turn by turn. But they were unaware of the repercussions, as every virtue comes with an impediment likewise before the occurrence of elixir, the most toxic poison ‘Halahal’ came out of it.
Halahal is said to be the most deadly poison, it had the potential to destroy the whole universe at once from ounce. That poison came out on the turn of Deities, by looking at the Halahal and knowing the aftermath everyone was scared, along with Deamons. So, the leader of both the groups went on Kailash parvat to ask for the help of Lord Shiva as he was the only hope for them who had the capability to tackle from the Halahal. There was no way to get rid of that poison, anything could lead to the destruction.
It is believed that as there was nothing that can be done about the poison so, Lord Shiv decided to consume it. During the consumption of the Halahal, it started to affect him, and Lord Shiv contains the three Loks (whole universe) inside his belly and his wife Goddess Parvati in his heart, gulping the poison would exterminate everything. So, Adishakti Goddess Parvati caught hold of his neck to avoid the poison from entering his body and so it remained in his throat making it blue-colored, Lord Shiv was named Nilkanth after this incident.