That process is called classical conditioning.
In classical conditioning, learning occurs through the association of stimuli, and the response is automatic—meaning the animal has no conscious control over it.
In operant conditioning, however, consequences directly influence whether a voluntary behavior will be repeated.
