The churning of the Ocean of Milk was an elaborate process. Mount Mandaranchal was used as the dasher (churning tool), and Vasuki, the king of serpents, became the churning rope. The gods held the tail of the snake, while the demons (Asuras) held its head, and they pulled on it alternately causing the mountain to rotate, which in turn churned the ocean. However, once the mountain was placed on the ocean, it began to sink. Vishnu in his second incarnation, in the form of a turtle Kurma, came to their rescue and supported the mountain on his back.
Note that the Mahabharata version of the story differs in many respects from the one in the various Puranas such as Bhagawat, Brahma-vaivarta, and Agni. For example, in Mahabharata, it was not Vishnu who took the Kurma avatara, but the Akupara, the king of tortoises, who did it on request from Devas and Asuras.