from the book Mahabharata
devas held tail
asuras (demons) held head
the naga is Vasuki
devas and demons fought for Amrita (the Elixir for Immortality) but no result
so Vishnu asked them to work together.
so they churn the milk of ocean
used mount madara as the pivot and Basuki as the rope
later mountain sank so Vishnu incarnated himself as the tortoise Kurma and used his back to support the mountain.
before producing the Amrita (elixir of immortality), the ocean of milk was churned for another 1000 years
also produced Lakshmi (wife of Vishnu), the elephant Airavata, the horse Ucchaishravas, a wishing tree and a lovely Apsaras.
Once produced, fight between devas and asuras to get Amrita. Vishnu intervened and helped gods to win. When peace was made, Indra was reinstalled as the king of gods.