There was a battle between the gods, and the demons in which, the demons, led by King Bali, won and started ruling the Universe. After being defe3ated in the battle, the gods lost their powers and energy. They approached Lord Vishnu who advised them to tactfully join hands with the demons and churn the ocean to extract the nectar which will restore their powers and energy. He assured them that he will preside over the event to make sure that the gods receive the nectar.
The ocean was churned using Mount Mandarachala as the churning rod, and Vasuki, the king of serpents, was used as the churning rope. The demons held the head of the snake, while the gods, on the advice of Lord Vishnu, held its tail. The gods and demons pulled back and forth on the snake’s body alternately, causing the mountain to rotate, which in turn churned the ocean. However, once the mountain was placed on the bed of the ocean, it began to sink. Vishnu, in his second incarnation as a turtle, Kurma, came to their rescue and supported the mountain on his back.
During the churning of the ocean or Samudra Manthan, a dangerous poison, Halahala, emitted from the ocean. This terrified the gods and demons because the poison was so toxic that it would have destroyed all of creation. Lord Vishnu told the gods that only Lord Shiva could save them from the destruction. Lord Shiva on hearing the pleas of the gods decided to swallow the poison. Goddess Parvati panicked, but he assured her that he won’t die of the poison. He stored the poison in his throat, which turned blue. Thus Lord Shiva is also known as Neelkantha, the one with blue throat.