"Where did Cain get his wife?" or "Who was Cain's wife?" are commonly asked questions—and reasonable ones! God did not choose to inspire the writers of Genesis to record every detail of the lives of its characters. That is to say, more went on than what we find in the Bible. Indeed, much of Genesis relates only summaries of broad spans of time. The Bible gives us the essential details, and we learn other facts from secular history.
In the case of the family of Adam, he and Eve had more children than Cain and Abel and Seth, although Genesis mentions only these three by name. Genesis 5:4 adds: "After he begot Seth, the days of Adam were eight hundred years; and he had sons and daughters." What can we learn from history on the subject?
Josephus is a widely recognized Jewish historian. The following footnote about Adam's family appears in his Antiquities of the Jews: "The number of Adam's children, as says the old tradition, was thirty-three sons and twenty-three daughters" (Chapter 2, Section 3). We cannot know that Josephus' sources were accurate, but the suggestion that Adam and Eve had many other children besides Cain, Abel and Seth is reasonable.
The logical answer to "who was Cain's wife?" is that Cain married one of his sisters. God's prohibition against marriage between close relatives came many centuries later (Leviticus 18).