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.
Many parents use physical punishment to stop undesirable behavior.
The biggest drawback to this method is that although the punishment stops the bad behavior for a while, it doesn't give the child an alternative. If the child doesn't know a good behavior, he or she is likely to return to the bad behavior. Physical punishment becomes less effective with time and can cause the child to behave aggressively. Other methods of punishment are preferred and should be used whenever possible. When you're away from home, consider using a car or a restroom as a time-out place.