Consistency in your reaction to a behavior is important because rewarding and punishing the same behavior at different times confuses your child. Attempt to stop the behavior, either by ignoring it or by punishing it. Introduce a new behavior that you prefer. The best way to stop unwanted behavior is to ignore it. This way works best when you're able to wait for results.
Physical punishment is less effective.
One way to encourage good behavior is to use a reward system. This way works best in children over 2 years of age. It can take up to 2 months to work. Keeping a diary of behavior may be helpful to parents, to show gradual changes in their child. This system helps you avoid power struggles with your child.