The demons always try to take away the kingdom of the demigods and sometimes they win. One such time, when Indra, the king of the demigods, lost his kingdom to the demons, Lord Vishnu asked the demigods to churn the ocean of milk in order to get the nectar that it contained.
We all know that by churning yogurt, we can get butter. Just like that, if the ocean of milk which is on the planet called Shvetadvipa is churned, nectar can be found. Whoever drinks this nectar can live forever.
The demigods then started to churn the ocean of milk, but they needed the help of the demons to do this, as only very strong people can churn the ocean.
Since the demons are as strong as the demigods, they held the rope on one side and the demigods held the other. The snake Vasuki was used as the rope and Mandara Mountain became the churning rod.
While the ocean was thus being churned, the Mandara Mountain slipped free from the rope of Vasuki and plunged into the ocean. Nobody could lift the mountain out of the ocean, so Lord Vishnu took the form of a tortoise that came to be known as Kurma avatara.
Lord Kurma swam to the bottom of the ocean of milk and put the mountain on His back. Then He swam up to the surface of the ocean and held the mountain on His back so that the churning could continue.
At first, as the ocean was churned, a very dangerous poison called Halahala came out. Lord Shiva drank this as nobody else had the power to live after drinking this poison. After all the poison was removed and drunk by Lord Shiva, the nectar came up.
The nectar was collected in a golden pot. It was supposed to be drunk by the demigods so that they would be victorious over the demons. But the demons also wanted it. So Lord Vishnu took the form a beautiful maiden, Mohini, to distribute this nectar to everyone.
He knew that if a woman did the sharing, nobody would fight with her.
Mohini started to give the nectar to the demigods first. Greedy to drink the nectar, Rahu, a cunning demon, was worried that all the nectar would be distributed before the demons got their share.
Rahu was not sure if Mohini could be trusted so he sat with the demigods and waited his turn to get the nectar. But Lord Vishnu knows everything and nobody can trick Him.
As Mohini, He used His Sudarshana disc and cut off the thief Rahu's head. Then He continued to give the demigods the nectar and did not have any. He also made sure to give the nectar to the demons who waited patiently.