In Proverbs 23:13 the bible tells us how to correct children:

13. Do not withhold correction from a child, for if you beat him with a rod, he will not die.

14. You shall beat him with a rod, and deliver his soul from hell.

I thnk this means if you correct a child because he or she did something bad (evil) by beating him her for the purpose of correcting him/her so the child will not do it again, it will keep him away from trouble or from evil.

A word of caution: Sometimes we loose our temper and want to take it out on our children or our defenseless love ones, when you feel these evil feelings, stop and pray to Jesus to give you patience and tolerance to deal with your love ones in a more Jesus-like way. Remember our Lord's teachings and keep them in your heart. Pray to the Lord for patience and tolerance. In some parts of the world, it illegal to beat children.