Many adult problem behaviours have their origins in having been inadvertently rewarded by owners when their dogs were puppies. Obviously it is better, and easier, not to "teach" your puppy the "wrong" behaviours in the first instance rather than to try and correct and retrain the dog in later life.
Firstly, how do you inadvertently reward behaviours? Rewards for a dog generally fall into 3 categories. The first and most obvious is food; second are games or toys; and, finally and probably as important as food, is your attention. Dogs are social animals and, therefore, the attention you give is very rewarding. How and when you give attention will "train" the puppy to continue to give behaviours which trigger this reward.
Attention is made up of 3 parts: touch (petting, stroking etc), tone of voice and, most importantly as far as the dog is concerned, eye contact.