Attachment is perceived by psychologists such as Dollard and Miller(1950) to be a product of learned behaviour and this can be explained using the Pavlovian derived concept of classical conditioning. Classical conditioning is defined as learning through association and often involves the pairing of two stimuli.
According to the learning theory of attachment, attachment is formed when the infant associates the caregiver (who is the person providing the food), with the pleasure gained from food. Before the process of conditioning occurs, food is perceived as the unconditioned stimulus(UCS), which elicits an unconditioned response(UCR) of pleasure. During conditioning, the infant begins to associate food(UCS) with the caregiver who at this stage is the neutral stimulus(due to not generating an initial response when presented on their own) , to produce the response of pleasure. As this process repeats, an attachment is formed between the infant and the caregiver as the infant produces the now conditioned response of pleasure from the caregiver's presence even without the food being present. This is because through the process of classical conditioning, the infant has now learnt to associate the pleasure gained from food with the caregiver who has now become the conditioned stimulus.
Simple Diagram:Before conditioning: Food (UCS) = Pleasure (UCR) During Conditioning:Food(UCS) + Caregiver(NS) = Pleasure (UCR)After ConditioningMother(CS) = Pleasure(CR)