In operant conditioning, punishment is any change in a human or animal's surroundings that occurs after a given behavior or response which reduces the likelihood of that behavior occurring again in the future. As with reinforcement, it is the behavior, not the animal, that is punished. Whether a change is or is not punishing is only known by its effect on the rate of the behavior, not by any "hostile" or aversive features of the change. For example, painful stimulation which would serve as a punisher in many cases serves to reinforce some behaviors of the masochist.
There are two types of punishment in operant conditioning:
Punishment is not a mirror effect of reinforcement. In experiments with laboratory animals and studies with children, punishment decreases the likelihood of a previously reinforced response only temporarily, and it can produce other "emotional" behavior (wing-flapping in pigeons, for example) and physiological changes (increased heart rate, for example) that have no clear equivalents in reinforcement.
Punishment is considered by some behavioral psychologists to be a "primary process" – a completely independent phenomenon of learning, distinct from reinforcement. Others see it as a category of negative reinforcement, creating a situation in which any punishment-avoiding behavior (even standing still) is reinforced.
Aversive stimulus, punisher, and punishing stimulus are somewhat synonymous. Punishment may be used for (a) an aversive stimulus or (b) the occurrence of any punishing change or (c) the part of an experiment in which a particular response is punished. However, some things considered aversive (such as spanking in BDSM) can become reinforcing. In addition, some things that are aversive may not be punishing if accompanying changes are reinforcing. A classic example would be mis-behavior that is 'punished' by a teacher but actually increases over time due to the reinforcing effects of attention on the student.
Punishment is sometimes used by treatment programs such as applied behavior analysis to reduce dangerous behaviors such as head banging or biting exhibited by autistic children. Punishment is considered one of the ethical challenges to autism treatment and is one of the major reasons for discussion of professionalizing behavior analysis. Professionalizing behavior analysis through licensure would create a board to ensure that consumers or families had a place to air disputes. (see Professional practice of behavior analysis)