We are all guilty of it. It may be just tossing a bone to your little furry friend, sharing some table scraps or letting them sleep in your bed, we all like to spoil our companions. While there is a lot of literature and training materials out there that say this is wrong many professional trainers will tell you this by itself is not what causes our dogs to act out in ways we dislike.
Much of the unwanted behavior from your pet is a result of rewarding those actions that you want them to stop. Much like babies that cry for a bottle your pet is going to whine, beg, or bark to get what it wants. If you provide a treat, or reward, just to make him stop then you are just letting him know that is what he should always do in order to get what he wants. In these cases the dog is the one doing the training and the human being trained. A good example is when your dog hears a squirrel or something he wants to chase out in the yard and starts barking. If you open that door to let him out you just reinforced the barking behavior you wanted to stop.
Practicing positive reinforcement is key to having a well behaved dog. This could be done with anything the dog enjoys whether it is his favorite treat, toy, petting or some play time. Whenever you see him doing a behavior you like give him a treat and pair it with some praise like Good Dog.
It is also important to ignore then bad behavior. We seem to pay more attention to our pets when they are getting into trouble than we do when they are doing something praiseworthy. This is a habit many of us fall into. If he is jumping on people and you start petting your pet to calm him down he just learned that if he jumps on people he will get petted.
Getting your pet properly trained while young is definitely easier but retraining a bad behaving dog is not impossible. It takes a good amount of effort and patience. Keep your training sessions short. Most dogs and owners will be maxed out and frustrated after about 15 minutes. Also keeping a variety of treats on hand will help keep your dog from getting bored before too long. These should be something your pet finds irresistible so it may take a bit of exploring.
Stay away from things that crumble or take a bit of chewing. Your dog should be able to gulp it down and be anxious for more. When first teaching a new behavior you are going to want to give him a treat every time. You will want to gradually decrease the amount of time you offer a treat until you get to the point of your dog wanting to do the good behavior just for your praise and maybe a treat.
While these tips will certainly not fix all behavior problems it will help to get your dog on the right track from the beginning. There are some habits that will be harder to break and you may want to get the assistance of a professional trainer. Depending on the temperament and breed of your dog he may benefit from other training methods. I blended approach is always more effective than just using one technique.