Stimulus control
Stimulus control is the phenomenon of a stimulus increasing the probability of a behavior (operant response) because of a history of that behavior being differentially reinforced in the presence of the stimulus.  In other words, stimulus control is basically learning to pay attention to things that we identify in the environment (discriminative stimuli) that give us information about the effectiveness of our behavior: what behavior is likely to be effective or ineffective, under which conditions, and what does that behavior give us (reinforcement or punishment). Therefore, in the presence of those stimuli we are likely to respond differentially.
Imagine the following experiment. A pigeon is trained to peck a left key in order to obtain food (reinforcer). After the animal learns this simple task, a right key is lighted red. Because the right key gives little information for the pigeon, after some time it is ignored. But what would happen if we change the procedure, turning the light on and off, and giving food to the pigeon only when it pecks the left key when the right key is lighted? Under these conditions, the pigeon starts to peck the left key when the right key is on, and not when it is off. Thus, we can say that the pigeon starts to respond differentially in the presence of these two stimuli (right key lighted or darkened). That is, the discriminative stimulus is controlling the pigeons behavior. In this context, control does not mean that the pigeon has no choice; it only refers to the probability of responding in the presence of the discriminative stimulus (lighted right key).
The opposite of discrimination, in which a subject learns to respond to one stimulus and not to another stimulus (e.g. the pigeon responds when the right key is on and not when it is off), is generalization. After behaving in a certain way in the presence of one stimulus, animals tend to behave similarly in the presence of a similar stimulus. That is, their behavior generalizes from one stimulus to another. For example, what would a pigeon do if, after being exposed to the procedure described above (i.e., after it learned to peck a left key only when a right key is lighted red), the intensity or wavelength of the light is changed? One way to try to answer to this question would be presenting five variations of the red light, each one presented for a relative brief period (e.g. 5 seconds), and measure the number of responses to the left key to each of the five color variations. The universal result  with pigeons, rats, fungi, monkeys, goldfish and people  is that response is highest to the original training stimulus (in this experiment, the initial red key color), and decreases systematically as the physical difference between the training and the test stimuli increases.
In the Quantitative Analysis of Behavior, stimulus control is examined from a number of perspectives, including Matching to Sample, and signal detection (Nevin, 1965; 1969).

# Matching to sample
Matching-to-Sample is a form of conditional discrimination.  In this form of conditional discrimination procedure, only one of two or more stimuli presented on other comparison keys from the sample, shares some property (e.g., shape).  Responses to the similar stimulus are reinforced.  In Oddity matching, a form of matching-to-sample, responses to the comparison stimulus that does not match the sample are reinforced.

# What else to see
Also see Signal Detection; Quantitative Analysis of Behavior