If there is a behavior you want to change, be sure to avoid punishment and instead use positive reinforcement. Being patient and giving them treats or something they enjoy when they perform behavior you enjoy will help them to learn. Note that treats are not the only thing you can reward your dog with, if they love toys or attention, then use them! Find what your dog loves and go from there. However, it is important to know that what they are doing is not spiteful. There are so many other explanations for behavior and you need to look into every one to find the right answer. Consider if they could be ill, missing something, or tired.