Baby learns that mother produces a sense of pleasure
A caregiver (e.g mother) starts as a NS (neutral stimuli) i.e something that produces no response.
However, when the caregiver provides food over time, he/she becomes associated with ‘food’. So the NS becomes a CS (conditioned stimuli).
Once conditioning has taken place the sight of the caregiver produces a CR (conditioned response) of pleasure. According to a learning theorist, the conditioned pleasure response is the basis of love.
Now an attachment has formed and the caregiver becomes an attachment figure.