In the lab, escape conditioning can be demonstrated with a shuttle box. A shuttle box is an enclosure with two sections separated by a partition. For example, a dog shuttle box might have a low barrier separating the two halves. To demonstrate escape conditioning all that is necessary is to shock the dog's feet. The dog then jumps to the other side of the box. Then, after a time, the dog is shocked again. It then jumps over the barrier again, escaping the shock.
Someone who finds school aversive may escape that situation. Most states require attendance until age 16. However, once students turn 16 they no longer must attend. So, some drop out at that point. Dropping out is a form of escape conditioning.
Avoidance conditioning is similar to escape conditioning. The difference is that a CS is given before the presentation of an aversive stimulus. For example, a light may precede the shock by a few seconds. What does the animal do under this new setup? At first, its behavior is no different than it was for escape conditioning. Namely, it jumps the barrier when the shock is delivered. Soon, however, it begins to jump before the shock. It jumps when the light comes on and thus avoids the shock. Also, unlike escape conditioning, the animal settles down emotionally. Dogs quit yelping, and calmly jump to the other side when the CS comes on.
Now, think what would happen if the CS were left on, but the shock discontinued. The animal continues to jump every time the light comes on. The animal will not test whether or not the shock is still on. Therefore, avoidance conditioning is highly resistant to extinction. You can get extinction if you restrain the animal after the light comes on, but it will struggle and show emotional arousal. After a number trials under restraint, the animal will extinguish.
Much of human behavior is explained via avoidance conditioning. Think of going to the dentist, for example. Most of us avoid going until the pain is already unbearable. Another good example is when we have to get an injection. We learned long ago to avoid the person and the place where injections are given. Our children quickly learned that going into the back room at the local clinic was a CS for an immunization injection, and they began to cry as soon as they entered that room, well before actually getting the injection.