Proverbs 22:6 (NASB)
Train up a child in the way he should go,
Even when he is old he will not depart from it.
Train up a child
The first thing we can take from this verse is that it is necessary to train up a child. Children do not raise themselves. They need to be trained. God has placed the privilege and responsibility of training children upon the parents. This is why children are to obey their parents. Their parents are to be instructing them in such a way that it requires the child to obey.
Ephesians 6:4 "Fathers, do not provoke your children to anger, but bring them up in the discipline and instruction of the Lord."
Colossians 3:21 "Fathers, do not exasperate your children, so that they will not lose heart."
We see in Ephesians and Colossians that parents are not to lord it over their children and exasperate and anger them in the way that they parent. But they are to practice disciplining them and instructing them in the Lord.
Discipline is not the same as punishment. Discipline is more closely related to discipleship. It is providing structure that aides the child's training and obedience. Instead of rescuing the child from the consequences of their actions, it is letting them experience the consequences in a safe environment that produces the learning of responsibility.
For example, if the child does not eat his dinner, he goes to bed without it and experiences what it feels like to not have eaten as he should have. The loving parent does not remove the consequence by allowing the child a different food option before bed so that he is not hungry. If the child does not do his homework, the parent does not do it for the child or send a note with a made up excuse to the teacher. The child must face the teacher and the consequences both at school and at home.
Using punishment as a means to stop your children from getting on your nerves is not discipline. If they are unruly to the degree you cannot tolerate them, they have suffered from a lack of discipline for an extended period of time. If they are on your last nerve on a consistent basis, they need training not punishment. If their relationship with their parents is mostly adversarial, it will be difficult to switch gears into training them up in the Lord.