The idea of stimulus discrimination is when someone learns to respond to only the initial stimulus and not to other later ones. This is an offshoot of stimulus generalization, where we respond to the initial stimulus and other ones, too.
As an example, let’s say Godzilla walked up Main St after hearing the civil defense siren blasting on the speakers from miles away. Once he goes into town, he inadvertently crushes a bystander to death with love. But, Frank, the operator of the siren, gives him a big juicy burger to make him happy.
The next time Godzilla hears the siren, he heads into town, smushes a bystander, and gets a big juicy burger. Every time Godzilla hears a siren, he thinks he’ll get a juicy burger if he crushes the life out of someone. This is stimulus generalization.
But one day Frank went on vacation, and Allen had to run the siren. Godzilla came into town, killed a bystander, and…no burger! Godzilla tried it again. And again. All to no avail. But then Frank came back from vacation and gave Godzilla a big succulent juicy burger after another siren and smashing visit. Godzilla would now only come to town if Frank was running the siren. That is stimulus discrimination, Godzilla learned to distinguish the various siren operators and realized only Frank would help him.