When Krishna was there in Vrindavan as a child he killed many demons. Then he went to Mathura and killed many demons. When he was in Dwaraka he killed many demons and then in the Kurukshetra war many demons were killed by the Pandavas. Now Krishna thought that it was the time for him to disappear but if he would just disappear then his family members could not live without him and they may even destroy the Earth. Thus he thought of sending of sending his family members before he goes as HIS FAMILY MEMBERS COULD NOT LIVE without him and they may even destroy the earth. Thus he thought of sending them before he goes.
After some days Vasudev (Krishna’s father) invited many great rishis – like Angira Narada etc. Had come to perform the yagya. After the yagya when the rishis the rishis were sent away for resting. When they were resting (according to Krishna’s plan), Krishna’s children came there and thought of making fun of them. They dressed Jamvati’s son Samba as a pregnant lady and went to the rishis and asked, "This lady is a baby and she wants to know whether it is a girl or a boy but she is very shy. Can you please tell us who is it?"
The rishis understood that they were making fun of him and thus got angry and cursed them, "a iron club will come out and it will be the cause of destruction of your Yadu clan."
The children understood there folly and thus asked for forgiveness and they quickly removed samba’sari and really an iron club came out. They were now very afraid and took the club to Ugrasen. Ugrasen himself broke the club into powder and at last a small piece was remaining and they thought it could do no harm and thus through it and all the powder into the sea water.
The powder was brought on the shore by the waves and the small piece was eaten by a fish.
After few days a fisherman caught the fish that had eaten the small piece. When he cut the fish he found the iron piece, he thought it was of no use to him and thus gave it to his friend, the hunter. He made a nice arrow of the iron piece and kept it with him.
The powder which came on the shore grew into many bamboo trees.
Yadu people’s disappearing:
The yadu people got to know about this and thus thought of doing a big yagya for their farewell. Thus they went on the shore of Prabhat Skhetra and performed a big yagya. After the yagya the rishis were fed and were given donations. Then after doing all these things they asked permission to eat. They were given permission and they started to drink the divine wine. After that they started to get angry on each other (according to Krishna’s plan) and the bamboo trees which were grown on the shore were used as their weapons and in some time all of them were killed.
After their disappearance:
Only Uddhava, Vrajranabh (Krishna’s grandson) and the queens were alive. Then after their disappearance of yadu people Krishna was resting under a banyan tree and was thinking how to disappear and Uddhava and Maitreya rishi came there. There Krishna said the Uddhava Gita (Bhagvad Gita) at the request of Uddhava. After that Krishna instructed Uddhava to go to Himalayas and preach to the rishis there. Thus Uddhava went.
The hunter who had made a arrow out of the small piece was once hunting and Krishna was resting under a banyan tree. The hunter from a far distance saw the base of Krishna’s foot which he thought to be a dear. Thus he took the arrow made out of the small iron piece and shot the lord. Afterwards when he came near he was surprised to see the lord himself. He was very grieved and asked for forgiveness. The lord said, "You were Vali in your previous birth and I was lord Rama and I had killed you secretly and you wanted to take revenge. Thus in this birth I am fulfilling your desire and this was all my plan only." thus saying this lord Krishna went away to his eternal abode, Goloka.
We are not enough pure thus we may think that Krishna died but the truth is that Krishna can never die but for his earthly Lilas he takes birth and dies too like normal people.