Long ago, a ferocious fight erupted between devas and devils in which devils were becoming victorious. The anguished devatas went to Lord Vishnu and asked for his help as devatas would lose all their power to devils in future. Lord Vishnu game them the suggestion of Samudra Manthan which will help them to extract nectar from the sea and thus all their powers would be replenished.
Thus, the agitation of Samudra-Manthan started. Churning of the ocean was not an easy task. Mount Mandara was used as the churning rod and Snake God Vasuki as the churning rope. Devils held the head of the snake and devatas held the tail. Mount Mandara began to sink when it was placed in the ocean and thus, lord Vishnu take the form of Kurma to uphold the mount mandara.
Many things including gems, Kamdhenu Cow and a pot of nectar (amrita) emerged from the Samundra manthan. But the most important thing was poison which can destroy the whole world. The devatas and Gods were fearful of poison and therefore they approached Lord Shiva for saving this world. Lord Shiva decided to swallow the poison and save the universe. When he consumed the poison, Devi Parvati put a hand on his throat so that the poison couldn’t hamper his body. Some school of thoughts believe that Lord Shiva himself retained it in his throat in order to save himself from any bad effects of poison. As a result, Shiva’s throat turned into blue color. He was later called as ‘Neelkantha’ i.e. the one with blue throat.