Cain’s wife was probably one of his sisters (5:4). Cain’s marriage to his sister would not have caused genetic problems so early in the development of the human gene pool.
God condemned Cain to be a wanderer. He might have built a city to rebel against this punishment, using walls for protection. Naming the city after his son shows how people who rebel against God often make humanity and its achievements into idols.