Herein lies the awesome responsibility of parenting. Parents socialize children through two mechanisms. The first is teaching through direct instruction reinforced by a combination of rewards and punishments for acceptable and unacceptable behavior. The second is teaching by example. Of the two, the latter is the more important mechanism since most complex human behavior is acquired through observational learning.
Children are much more likely to do as a parent does than as a parent says.
This is why parents who lie and cheat tend to raise children who lie and cheat, despite any direct instruction to the contrary. As Benjamin Franklin once observed, the best sermon is indeed a good example. Rather, it is parents who are necessary, and this means a mother and a father. There are, of course, thousands of single mothers who are doing a heroic job of parenting and beating the odds. I do not mean to denigrate their efforts.