Here's a generalised answer.
It starts at the very beginning, when your children aren't rational. You let them know they are loved and you will protect them. With that sense of security they start to explore, with confidence.
As they become rational they will start to have questions, you answer them as best you can, let them learn. Don't lie to them, offer your opinion, make sure that they know it's just an opinion, tell them what it's based on. Have, a well thought out, set of rules. Make sure they know the consequence of breaking them. Make sure they know why you have put those rules in place.
After they become adults, hopefully you can tell yourself that you've done the best you could. Their decisions from there on in is there own. If your best wasn't good enough, well you have two options. Feel guilty for the rest of your life, or not.
P.S. Decipline doesn't have to mean, physically assaulting your child. Feel free to rationalise, but if you hit your kid, that's what you are doing. What would you do if a stranger hit your kid. Why would it be okay for you to do it. You are their father or mother, you should suscibe to a better set of standards then you would demand from a stranger.