Classical conditioning; operant conditioning.
Classical conditioning is a person's old response to a new stimuli. They have already learned a specific type of behavior from an old event so they are conditioned to respond to a new stimuli that resembles the old one in a similar way.
Operant conditioning is a type of learning in which behavior is strengthened if followed by a reward or diminished if followed by a punisher.