I'm sorry to have this narrow-minded thought that it is all to do with parenting. Parents are important as they are the means of primary socialisation and they are the ones that can integrate anything into their heads from a young age... However, a childs social life contributes to a lot of their behaviour as well; what teachings they have in their school, what kind of friends they have and the environment that they live in as well.