The Samudra Manthan or the churning of the ocean of milk is the most narrated Hindu episode among all.
Once, Sage Durvasa paid a visit to Indra and gifted him a garland of flowers. Indra, drunk, was not in his senses and thus, threw the garland on his elephant. The elephant crushed the flowers under his feet. Durvasa felt offended and cursed Indra that Lakshmi shall leave him and all his wealth shall be ruined. Again one day, while drinking, Indra insulted his own wife, Lakshmi and thus, Lakshmi left him and went away. Without Lakshmi, Swarga was no more Paradise. All the wealth of Swarga had gone away as the Goddess of wealth had left it.
Worried, the Devas rushed towards Vishnu. Vishnu informed them that the Goddess had sunk herself into the Kshir- Sagar (ocean of milk) and so, she had to be churned out of the milk.
Without Lakshmi, wealth would not exist. So even the Asuras agreed to help in the churning.
Vishnu instructed the Devas to place Mount Mandar on the Ocean of milk and use it as the churning rod and to use Vasuki (the king of the Nagas) as the churning rope.
But as soon as Mount Mandar was placed on the ocean, it sank due to its weight. So Vishnu, in his Kurma avatar (turtle incarnation), lied down on the surface of the ocean and placed Mount Mandar on his back.
Soon the churning began with the Devas, Brahma, and Shiva on one side and the Asuras on the other. The Gods pulled its tail and the demons pulled its head alternatively. The sages chanted hymns to encourage the churners.
As milk got converted into butter, Lakshmi emerged. Elephants welcomed her by spraying fragrant waters. Lakshmi also brought along some incredible treasures such as Kalpavraksha (the wish-fulfilling tree), Airavat (a white elephant that became Indra’s vehicle), Apasaras (dancing damsels), Gandharvas (divine musicians), Amrita (the nectar of immortality), etc.
Both the Devas and the Asuras craved for these treasures. They started fighting for Amrita. So Vishnu took his female incarnation as Mohini. The Devas and the Asuras were so enchanted by her beauty that they kept their eyes fixed on her. As the Asuras lost control over their senses while glaring at her, she quickly made Amrita flow down the throat of the Devas. When the Asuras realized this, it was too late.
Because Vasuki had been used as the churning rope, it emitted an extremely poisonous liquid called Halahal. If it wasn’t consumed, it could poison the entire holy Kshir- Sagar. And no one except Shiva was willing to consume it. Shiva consumed it because being an ascetic; he does not distinguish between Amrita and poison. After consuming Halahal, his throat turned blue in color, which is why he is also called Neelkanth (one with a blue throat).
All other treasures except Lakshmi accompanied the Devas to Swarga. The Devas and the Asuras tried to impress Lakshmi so that she accompanied them. But Lakshmi was impressed by Vishnu because he wasn’t trying to impress her. He didn’t seek her for her wealth, unlike the Devas and the Asuras. So she married him. Vishnu became Shri and Lakshmi became Shridevi.
According to legends, there is also a story that Shiva did not recognize Mohini as Vishnu and got enchanted by her beauty. Shiva and Mohini produced a son named Ayappa. Several temples in South India are associated to Ayappa.
What we learn from the story of the Samudra- Manthan is that to obtain something fruitful, even the worst of enemies have to get together; just like the Devas and the Asuras did. As the Asuras always attacked their own brothers, they were not blessed with Amrita or any other treasure that emerged from the ocean of milk. From Vishnu, we learn that as he did not crave for wealth, wealth itself approached him (as Lakshmi).