Long ago, it so happened that once Sage Durvasa arrived in the heavens and saw Indra sitting on Airavata, the elephant vehicle of Indra, going with his pomp and glory. Seeing this, Sage Durvasa was immensely happy, and in this happiness, he gave Indra a garland which was offered to Lord Srihari. Indra kept that garland on Airavata, and it crushed that garland with its feet. Seeing this, Sage Durvasa was highly enraged and hence cursed Indra to lose his kingdom of the heavens and aishvarya.
Thus, cursed by Sage Durvasa, Indra lost all the wealth, kingship of the heavens, his Airavata, Kalpavriksha, Kaamadhenu, Amrita, etc., and all this got dissolved in the Milky Ocean. Lakshmidevi entered the Milky ocean, but with one form She was always present in the vakshasthala of Lord Vishnu, thus being eternally united with Lord Vishnu. All the devatas headed by Indra approached Lord Brahma, who was the guru to the whole universe after Lord Narayana Himself. Lord Brahma told them that this problem can only be solved by Lord Vishnu. So, all the devatas led by Lord Brahma approached Lord Vishnu in Vaikuntha and praised Him. Pleased by their praises, Lord Vishnu said, “We need to churn the milk ocean (which is Ksheerasagara) to get the lost wealth again. But for this, we need to include the demons too, by the ahi mooshaka nyaaya. For churning the ocean, we need Mount Mandara as the churning stick and Serpent king Vasuki as the churning rope.” (In simple words, Ahi mooshaka nyaya, also known as the Snake and the Mouse Logic, means two bitter enemies are forced to team up just to survive a crisis, until the work is done.)
So, all the devatas following the instructions of Lord Narayana approached the demons and asked them to also accompany them in the churning of the Milky Ocean. The devatas proposed a pact that everything that will be obtained via the churning of the Milky Ocean will be divided equally. The demons, too, agreed. Now, all of these people approached the Mandara parvata. But this Mount Mandara had a boon from Lord Shiva that nobody could lift it. The devatas tried to lift that mountain, but couldn’t lift it. They finally took refuge in Lord Vishnu. Lord Vishnu easily lifted Mount Mandara, as if it were a toy, and placed it on Garuda. Since Garuda is equal to Lord Shiva, he could lift it easily. Lord Vishnu, being the supreme God Himself, lifted the mountain easily. These devatas led by Indra were lesser than Lord Shiva; therefore, they couldn’t lift it.
Now these devatas and asuras became arrogant about Garuda being able to lift the mountain, and argued that they could also lift the mountain. To this, Lord Vishnu placed that mountain on the devatas, saying, “Now lift it.” The devatas and asuras got crushed under Mount Mandara and broke their bones. Lord Vishnu lifted Mount Mandara and again placed it on Garuda. After that, He looked at the devatas compassionately. Immediately, the devatas were normal, fine, healthy, and recovered. Now, this Mount Mandara was placed on the Milky Ocean as the churning stick, and Vasuki was made the churning rope. The demons argued that they didn’t want to be at Vasuki’s tail’s end and claimed the spot where Vasuki’s head was. The devatas smilingly agreed.
The churning of the ocean started. The Mount Mandara was going down and was drowning. The devatas remembered Lord Vishnu. Immediately, Lord Vishnu took the form of a tortoise, which was one hundred thousand yojanas (eight hundred thousand miles) long, and lifted the Mandara Mountain on His back (shell of the tortoise). This is known as Kurma roopa of Lord Narayana. Srimad Bhagavatam says that when these devatas and demons were churning the Milky Ocean, it was like a soothing scratching sensation. This rhythmic, massaging motion made Kurma Bhagavan feel so relaxed that He peacefully drifted off to sleep while effortlessly balancing the entire weight of the cosmic operation on His back.

But then, this Mandara mountain was coming up; therefore, Lord Vishnu Himself in His Ajita form came and sat on the Mandara Mountain and balanced the whole mountain, enabling the devatas and demons to do the churning of the Milky Ocean easily. Here, Vasuki was very tired and fatigued by the continuous stretching. From one side, the devatas pulled, and from the other side, the demons pulled. It started emitting poison from its mouth, where the demons were standing. The poisonous air was suffocating for them, and clouds came near the devatas and provided them with cool air. Therefore, seeing this Lord Vishnu, Himself entered Vasuki and provided the strength to endure this pulling.
Thus, after that, the story is known as how Halahala poison came; all the devatas took refuge in Lord Shiva; SriMukhyaprana Vayudeva and Lord Shiva together drank it with the blessings of Lord Vishnu, as per Rigveda’s Keshi Sukta and Padma Purana; then different things like Airavata, Kalpavriksha, and Uchhaishravas horse came, and finally Mahalakshmidevi emerged from the ocean, holding vara and abhaya poses in both Her hands and lotus flowers in both Her hands, like the sun rising luminously from behind the mountains. She had a mangalasutra already tied around her conch-shell-shaped neck, which showed she was eternally married to Lord Vishnu. She had four braids and a hair bun, which was decorated with fragrant flowers. She appeared draped in pure, unblemished yellow silk, traditionally referred to as Pītāmbara or Kauseya.
She, with a garland or varamaala, went there. There, She found faults in each devata and finally chose Lord Narayana, since He was the only one who was flawless, was full of all auspicious attributes, and was the Supreme Being Himself. Therefore, She married Lord Vishnu. Already She had a mangalasutra in Her neck, which showed that She was eternally wedded to Lord Narayana, but then they got wedded again just for the welfare of all. After this, Bhagavan Vishnu Himself emerged from the Milky Ocean as Dhanvantari holding the Amrita kalasha in His hand. From His eyes came tears of joy. These tears came from Tulasi. This Tulasi is also a form of Mahalakshmidevi.
These demons took away the Amrit kalash from Dhanvantari’s hands. Lord Dhanvantari, too, kept quiet just to show how cruel and selfish the demons were. Therefore, to take back Amrita from them, He assumed the form of Mohini, an enchanting stree roopa of Lord Vishnu, which was even more beautiful than Mahalakshmidevi Herself. By that roopa, He bewildered the demons, took Amrita from them and distributed it among the devatas and then cut Rahu’s head when he came in between Surya and Chandra to deceitfully have the Amrita. After that, a great war happened between the devatas and demons, wherein finally Lord Vishnu appeared there and defeated all the demons, and the war ended, plus the devatas gained their wealth, and Indra too gained his kingdom in heaven, and all lived peacefully.

Hope this helps!
Jay SriRam!
ShriKrishnarpanamastu!