Cain got his wife by marrying one of his sisters. Shortly after the time of creation, human genetics was pure. Inbreeding would not have any problems. So, Cain married one of his sisters. This may sound foreign to the modern ear, but it wasn't back then.
In Genesis 4:16-17 it says,
"Then Cain went out from the presence of the Lord, and settled in the land of Nod, east of Eden. 17And Cain had relations with his wife and she conceived, and gave birth to Enoch; and he built a city, and called the name of the city Enoch, after the name of his son."
Genesis tells us that Adam and Eve had two sons: Cain and Abel. Cain killed Abel, was exiled by God, and then in Genesis 4:17 we read that Cain had relations with his wife. Where did Cain get his wife? The answer is simple: Cain married either his sister or a niece.
In Genesis 5:4 we see that Adam had other sons and daughters.
"This is the book of the generations of Adam. In the day when God created man, He made him in the likeness of God. 2He created them male and female, and He blessed them and named them Man in the day when they were created. 3When Adam had lived one hundred and thirty years, he became the father of a son in his own likeness, according to his image, and named him Seth. 4Then the days of Adam after he became the father of Seth were eight hundred years, and he had other sons and daughters. 5So all the days that Adam lived were nine hundred and thirty years, and he died," (Gen. 5:1-5).
Since Adam lived several hundred years, having lots of children was not a problem. The Genesis account does not tell us about the order of the births, nor does it tell us how old they were. It was the ancient custom to often extract relevant information (sometimes out of order) to emphasize a point. By having many children, it is certainly possible that there were many women around. This would mean that Cain married a sister, niece, or some other relation, and their children had children, etc. Of course at this point, the question of inbreeding is raised. It was not a problem early on in the human race because the genetic line was so pure. Therefore, the prohibition against incest was not proclaimed until much later (Lev. 18:6-18) when inbreeding started to become a problem.
This article is also available in: Português