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.