What does Genesis 4:17 mean?
In spite of his fears, Cain's life did not come to an end as a result of the murder of Abel. God's punishment for his crime was severe, but not fatal. Instead of farming, Cain began to build a city where he had settled in the land called Nod. This seems to run contrary to the punishment meted out by God, that Cain would be a wanderer. Then again, as mankind begins to multiply, God seems to be less directly involved in their lives—this would include allowing more room for people to sin and suffer their own consequences. Whether Cain is blatantly defying God, or if the "wandering" God had in mind was simply to be forced into exile, the Bible does not say.Cain also got married. Where did his wife come from? Our best understanding is that the murder of Abel happened decades—perhaps many years—after Cain and Abel were born. The first generations of humans after the garden lived for hundreds of years. It is very likely that Adam and Eve had many more sons and daughters after Cain and Abel, and before Seth. Ancient genealogies very often only mention offspring directly related to the story at hand, so we would not necessarily expect the Bible to spell out every child of Adam and Eve. It's very possible, by the time we get to Cain's wife, that there were other sons and daughters of Adam and Eve, who themselves had children and perhaps grandchildren. With such a long reproductive cycle, the population of the earth could have increased exponentially over several hundred years.
The point is that Cain likely married a sister or one of many nieces or even grandnieces. This early in human history, intermarrying with one's direct sibling would not have carried the genetic risks it does now. It was not forbidden by God; in fact, it would have been the only option for populating the earth. Later, as mankind's biology becomes more polluted, God will forbid Israel from this practice.
Cain, apparently a proud father, names his city after his son Enoch.