After Hashem decreed that Kayin would be a wanderer, he left his abode and went east. The Torah tells us that Kayin subsequently had a son, whom he named Chanoch. Kayin then built a city and named Chanoch, after his son. What is the significance of the name Chanoch, and why did Kayin give the city the same name as his son?
The Kahallat Yitzchak (quoted in Itturei Torah) explains that after Kayin murdered his brother, he regretted his evil deed. He looked into himself, wondering what had led him to murder. Kayin found that he lacked a background in the trait of mercy and therefore had no any compunction in taking a life. In order to ensure that his son would not suffer the same fate as he had, Kayin named him Chanoch, from the root Chinuch (to educate or train). Kayin wanted to emphasize, to himself and to his son, that training in proper Middot (character traits) is of the utmost importance. But simply naming his son Chanoch was not enough. Kayin realized that despite upbringing, surroundings also play a key role in determining a person's actions. He, therefore, named the entire city Chanoch in order to create a wholesome environment that would remind his son of the need to be trained in proper Middot.
We can glean several important lessons from Kayin’s actions. When we do any Aveirah, we must always look inside to see what caused us to sin. Once we have done so, we can figure out what to do so that we don't fall into the same trap again. In addition to taking concrete actions ourselves, we must also try to create an environment conducive to our goals. And, once we have accomplished that, we can have some hope of success in the all-important mission of educating our children and setting them on the proper path.