Genesis 4:16 : Then Cain went away from the presence of the Lord and settled in the land of Nod, east of Eden.
The exile of Cain ultimately meant that Cain had no posterity. Eight generations after Adam, God rescued Noah's family from the great flood that came upon the earth. In the intervening generations it's likely that some of Cain's descendants had married some of the descendants of Seth, the younger brother of Cain and the ancestor of Noah. The descendants of no others sons of Adam survived the flood; only the line of Seth, through Noah, survived and, .according to Luke, extended all the way to Jesus of Nazareth-- 52 long generations. The line of Cain, recorded in Genesis 4, lasted seven generations and ended either in the flood or a little before.
God sent Cain away from the family of his father Adam because Cain had killed his brother. God did not execute Cain for this murder, however; he did something more dreadful. He threw him out for good. Others had left home by this time. The Bible does not imply that Cain, Abel, and Seth were the only children of Adam and Eve, because Cain found a wife in the land of Wandering (which is what "Nod" means). She had been born to somebody in the family. Others left home, but Cain could not return home He was unwanted, it was entirely his own fault, and his punishment was greater than he could bear.
God's decree meant that Cain wouldn't be pursued, or killed; but he wouldn't be cared for either. The land of Nod where he settled is the prototype of Hell: the place of total loss and loneliness—existence apart from the life God created the human race to live.
Why does God do this to people like Cain? Why must the unrighteous be separated forever from the presence of God? Here is how I answered the question in my first book,, The Touch of God, in 1975.
As the place where God dwells, (heaven) will not be contaminated or spoiled by anyone who doesn't belong there. Since it is the presence of God, heaven would surely be a place of utter misery to anyone who has hardened his heart against God. Hell is a miserable place, but it is also an extension of God's mercy: God doesn't allow those who will be miserable anywhere to burden others with their misery. Instead he lumps all the misery together in one place, and we call it Hell. (The Touch of God, p. 129)