How Dogs Learn

It is common to hear the complaints "my dog is being stubborn," or "my dog peed on the carpet (or ate my shoes, or chewed my sofa cushion, or you name it) just to get back at me!" or "he knows he did wrong because he has a guilty look on his face."
As much as we would like to think we know what our dogs are thinking, if your dog has done something that you find inappropriate I can tell you, without ever meeting your dog, that it has absolutely nothing to do with being stubborn or vindictive. And your dog does not feel guilty, ever, regardless of the severity of his crime! Don't get me wrong — your dog loves you unconditionally and he wants to please you, but dogs do not think like we do, and they do not perceive the world in the same way we do.
Dogs are amoral, which means they have no concept of right or wrong (which would be necessary before you could have anything resembling guilt or vengeance). So while there may be any number of reasons why your dog is doing what he's doing, it's not for any of the above reasons.
In general, dogs learn behaviors (and their view of the world) in two ways:
1. Dogs Learn by Association
Dogs who repeatedly have a fun, enjoyable experience with something will form a positive association with that person, place, or thing. Conversely, a bad experience could cause your dog to form a negative association.
For example, new puppies generally find leashes inconsequential; when first shown a 6-foot length of nylon with a clip at the end they have a neutral association to it. But find a way to associate it with something he loves and you can teach him to love the leash, too. How? Clip on the leash and give him treats or take him for a walk. Every time you leash him, either take him for a walk or give him treats until you take the leash back off. Pretty soon the puppy figures out that the leash means fun and, bingo — you have a dog who loves leashes!

Learning by association also works in reverse. You can teach a dog to hate or fear leashes by using them to give corrections or using them to tie him up outside by himself.

Fortunately, we have a lot of control over our dog's associations to people, places, and things. Everything you do around your dog influences the associations he makes.

Here is an important example: Say I am walking my dog and I don’t like the way he reacts to seeing another dog. Maybe he just barks in excitement, but I don’t like it. So I shout, “No!” and jerk his leash. This happens every time we see a dog. Pretty soon, my dog’s reaction to other dogs is terrible — he barks and growls and lunges and snaps because I have built a negative association to other dogs. To him "Dogs equal pain!" I have taught my dog to dislike or fear other dogs.

Another drawback of using punishment or "correction" is that it has unintended side effects. It builds a negative association with the punisher, adversely affecting the bond between person and dog. It can create uncertainty in the dog, and hesitancy in learning behaviors because he never really knows for sure if he will be rewarded or punished. In extreme cases, punishment can result in aggression, or the dog simply shuts down.

2. Dogs Learn by Consequence
This means that something the dog does results in a consequence that the dog finds either rewarding or punishing. The consequence has to occur within seconds of the behavior in order for the dog to relate the consequence to that behavior. If the dog finds the consequence rewarding, the behavior will be reinforced, thus the dog will begin to offer more of it. If the dog finds the consequence punishing, he will be less likely to offer that behavior again in the future (note punishment does not teach the dog what to do instead, so you may end up with an alternate behavior that is worse). How you respond to your dog can lead to an increase or a decrease in the preceding behavior, but remember — dogs learn by association, so punishing your dog can cause him to form a negative association with you!
It's important to give your dog immediate feedback — let him know right away when he has done something you like. Say, for example, I lure a dog into a sit with my hand. Then I rummage around for a treat. By the time I deliver the treat five seconds later, the impact is lost because in those five seconds, the dog sneezed, sniffed the ground, and looked left. All of a sudden a treat appeared. As far as the dog is concerned, he got the treat for looking left. You will eventually teach that dog to sit, but it will take awhile. Or you may end up with a dog who sits and looks left as a matter of course.
A dog’s view of the world...

So, dogs learn in two ways — by association and by consequence. And because of these two ways of learning, dogs see the world in two ways: what is safe vs. what is dangerous, or what works vs. what doesn’t.

Safe vs. dangerous: This outlook on life comes from learning by association. When a dog gets punished for peeing on the carpet in front of you, he doesn't learn the difference between inside and outside — he learns that it is not safe to pee in front of you, but it is safe to pee when you are not there.

Works vs. doesn’t work: This outlook on life comes from learning by consequence. Dogs try staring at the refrigerator as a strategy to get it to open. After a time they give up because it doesn’t work; the fridge never opens. They also try staring at their people at the dinner table. Every once in a while someone gives in and shares a bite. Staring at people while they eat often works, so dogs continue to do it.

Dogs do what is safe and what works. That’s all.

If a dog barks at you to throw the ball and you throw it, rest assured he will do that again. If you ignore the barking he will eventually give up and try something else. He is not trying to be obnoxious; he is just doing what works. If you ask a dog to sit and he doesn’t, he is not being stubborn; you just haven’t trained him well enough yet.

In other words, dogs are dogs, not people. Learn how to communicate with him in a way he can understand, be patient, be kind, and be careful about what you pay attention to and what you ignore.