Repetitive behaviour becomes learnt behaviour. If you have a dog who gets excited, runs around like crazy, jumps up and wont listen, chances are it learned to be this way because you accidentally encouraged it. When dogs are puppies, its really cute when they jump up and act goofy. Unfortunately, petting a dog or playing rough with it when it jumps up or mouths and allowing it the freedom to run around in an excited state, encourages the dog to continue these bad habits. When teaching dogs appropriate conduct, you must interrupt all unwanted rough play. When deciding how you let your pet to interact, consider how you would ideally like it to behave, since the behaviour it repeats, will become the foundation of its behaviour in the future. Anytime your dog, or puppy instigates rough or inappropriate play, this is an opportunity to interrupt and redirect its energy. You can seize this opportunity to set up the rules for appropriate access to play and freedom. When the dog offers a desirable behaviour, then you can reward it with either a treat, a toy, play or praise. I also give praise for any and all appropriate behaviour, so that it becomes repetitive and learnt!
Dogs learn through trial and error. Puppies learn what works and what doesnt, most of this they learn through play. Of course you want your puppy to experience life and to enjoy itself. Nevertheless, when teaching using play, there has to be rules. Rule number one, only calm or positively focused behaviour earns access to praise, play, toys and treats. Secondly, you the human has ultimate power over these resources. For instance, the dog must relinquish the toy or cease the game on command. If you like to play games like tug or wrestle with your dog, be very sure that you are the one controlling the game. When you say the game is over, the dog must respect that. When you ask it to OUT or DROP the toy, it must do so. A great positive way to establish this is indicate the game of tug or play is over, (either by putting the toy away or with holding it and all contact until the dog settles down) then resume as soon as the offers calm or focus behaviour. Furthermore, I recommend only engaging the dog in a game as long as it is relatively interested, then the game holds value and the dog considers it a reward. You dont have to play with your dog until it is completely exhausted. If the game is over when the dog is tired of it, this only teaches the dog that it is in control of the game. It is good to encourage play, then ask for a sit or a lay down to re-acivate the play again. In doing this you have established that you are the source of fun and learning.
It is also beneficial to incorporate some play time into all training exercises. Making it fun for your dog, will make it fun for you and you are likely to practice and train more regularly, as well as engage your dog for longer periods of time. If you have a fully grown dog, possibly even a rescued dog, it is never too late to establish new rules. You may not even be the person responsible for re-inforcing the bad behaviour it has learned, but you are responsible for the way it learns from here on in. If you interrupt all unwanted behaviour, ceasing play anytime the dog gets too rough or isnt listening, then resume as soon as it demonstrates good manners and calm energy, you can turn a dog around! I cant emphasize enough rewarding ALL calm positively focussed energy with praise, play, toys or treats. Then the dog will more likely offer this type energy in the future. If you praise and treat for all wanted behaviours they will become default behaviours. You can teach even an old dog new tricks!