As the Bhagavata Purana tells it
Bhagavata Purana 10.15 to 10.17 · 3 min read
There was a bend of the Yamuna below Vrindavan where nothing grew. The water there steamed. Birds that flew over it dropped out of the air, and the trees on the bank stood grey and leafless, and the grass would not come back however many rains fell.
One hot afternoon the cowherd boys drove their calves down to the river and, being thirsty, drank from that bend. The calves drank too. They fell where they stood, boys and calves together, on the bank.
Krishna came after them and saw them lying there. He looked at them, and they got up again, rubbing their eyes, and could not say what had happened.
"The water is poisoned," said one of them. "Something lives in it."
Something did. Deep in the pool lay Kaliya, a serpent with a thousand hoods, who had come up the river from the sea with his wives and children and his whole household, and whose breath boiled the water above him.
Krishna climbed the one kadamba tree on the bank that the poison had not killed. He tied his cloth tight round his waist, slapped his arms, and jumped.
The pool rose up in a wave and fell back. Kaliya came up out of the dark, coppery-eyed, and wound himself round the boy from his feet to his throat and bit him, again and again.
The cowherd boys ran screaming to the village, and the village came: Nanda, and the old men, and the women with their pots still on their hips, and Yashoda running ahead of them all. They saw the boy wrapped in the black coils and not moving. Yashoda tried to go into the water after him and the women held her back.
Only Balarama did not cry. He stood at the edge with his arms folded and watched his brother, and smiled a little.
"Wait," he told them. "He is not finished."
In the coils Krishna saw his mother's face, and began to grow. He swelled until the serpent's body creaked and opened, and he slipped out of it, and while Kaliya was still raising his hoods to strike, Krishna sprang up onto them.
And there he danced. Whichever head lifted, he stamped it down; whichever hood swayed, he was already on the next. The gods came to watch from the sky and beat drums for him, and the gandharvas sang. Kaliya twisted and lashed and grew weaker, and blood came out of his mouths instead of poison.
Then his wives came up out of the pool, with their children held out in front of them, and bowed down in the water.
"Punish him if you must," they said. "But he is our husband. Leave him to us."
Kaliya, crushed under those small feet, remembered at last who it is who stands on the heads of serpents, and asked for mercy.
"Go back to the sea," said Krishna, stepping off. "Take all your people with you. Garuda will not touch you now. He will see my footprints on your hoods."
So the serpent went down the river and away, and the water of that bend ran clear, and the trees came back.
Later, when they asked why Kaliya had chosen that one pool, the book has the answer. A sage called Saubhari once lived under the water there, and Garuda caught a fish in it. Saubhari cursed him: if he came to that pool again, he would die. So it was the one place on earth where a serpent was safe from Garuda, and Kaliya had found it.
As the Vishnu Purana tells it
Vishnu Purana V.7 · 1 min read
The Vishnu Purana tells the same afternoon a little differently, and the difference is in why the boy lies so still.
Krishna, it says, went down to the river on his own that day, without Rama, wearing wild flowers. He saw the boiling pool and the scorched trees, and thought: this is my own doing. Long ago, as Garuda, he had driven Kaliya from his island in the sea, and here the serpent was, fouling the river.
He climbed the kadamba and dived in. Kaliya rose with hundreds of serpent women round him, their earrings flashing, and they wound about him and bit him with fiery teeth, and he lay in their coils and did nothing at all.
The boys ran to Vraja crying that Krishna had been bitten to death. Yashoda came stumbling at every step. Nanda saw his son's face in the coils and fainted, and Yashoda fainted beside him. The gopis said they would all walk into the pool with her, for what was the village without him.
Then Balarama spoke to his brother, and he spoke to him not as a brother but as what he really was.
"What is this, god of gods? You have played the man long enough. Do you not know yourself? Look at them, your own people, weeping on the bank."
Krishna smiled, as if he had just remembered. He pulled himself out of the coils, took the middle hood in both hands, bent it down, set his foot on it, and danced.
When the serpent was dying, it was Kaliya who spoke the strangest words.
"I am a snake. It is a snake's nature to be savage. You made that nature. I have only been what you made me."
Krishna let him go, and sent him to the sea.