This type of associative learning is known as classical conditioning, and it was first described by the Russian physiologist Ivan Pavlov in the late 19th century. Pavlov's experiments showed that dogs could learn to associate the sound of a bell with the presentation of food, and would eventually start to salivate in response to the bell alone, even in the absence of food.
Classical conditioning is a powerful form of learning that can have a significant impact on our behavior. It is responsible for many of the fears and phobias that we develop, as well as our preferences and aversions.