Classical conditioning uses an unconditioned stimulus and an unconditioned response with conditioned stimulus and a conditioned response. The most famous example is Pavlov's dog. The dog would salivate (unconditioned response) when meat (unconditioned stimulus) was placed in or near the dog's mouth. A bell was sounded (conditioned stimulus) just before the meat was introduced. After repeating this conditioned stimulus (bell) with the meat, the dog would eventually salivate only with the conditioned stimulus of the bell. Thus, the salivation occurring with only the bell became a conditioned response.
Operant conditioning is different in that it is based more on behaviors resulting from rewards and punishments; more controlled stimuli and responses. The Law of Effect is associated with this kind of conditioning. The law is more about the effect associated with the response. This law states that responses that are pleasing are likely to recur and responses that are displeasing are less likely to occur. This is a basic statement about how rewards are likely to encourage a repetition of behavior and punishments are likely to discourage a certain behavior.
The Law of Effect goes a step further, stating that after repetition, the pleasing response will recur without its associated stimulus. Therefore, a behavior is reinforced (with rewarding responses) or discouraged (with punishments) and those behaviors will repeat (eventually) without the associated stimuli. This provides a way of conditioning behavior and eventually doing away with a conditioning stimulus.
The Law of Effect, earlier articulated by Edward Thorndike and Lloyd Morgan, would later influence B. F. Skinner's studies on behaviorism and helped develop the science of psychology and conditioning. This law has been described as analogous to natural selection because a pleasing (survival) outcome is more likely to repeat, thus resulting in the survival of the fittest. The law is also useful in studies in terms of naturalism and how contextual and environmental factors influence behavior. This has a wide range of uses. One example: two people fall in love but the relationship becomes abusive. However, since that initial feeling of love conditioned them to associate that rewarding feeling with each other, they continue to stay together despite the fact that the relationship has gone sour. The psychologist/therapist must explain to the couple that the initial effect (love - the stimulus) is now gone and therefore their behavior is seeking a reward in what has become more like a punishment. In this case, the couple has become more like Pavlov's dog, simply associating love with each other even though that effecting stimulus is gone. If the couple had stayed more aware of the law of effect, they would have recognized the moment the relationship went sour: the moment when the pleasing effect stopped occurring.