Infant attachment is a special bond first developed in infancy.  It is the first relationship an infant has, usually with its mother or parents.

Research on human babies by developmental psychologist Mary Ainsworth in the 1960s and 70s found that children may have different patterns of attachment. This depends mainly on how they experienced their early caregiving environment. Early patterns of attachment, in turn, shape – but do not determine - the individual's expectations in later relationships.

During the first stage of development the mother nurses the baby and the mother and infant(s) stay physically close to each other unless the mother needs to leave to seek food (etc.). While the mother is gone the infant(s) remain hidden and quiet, sometimes in a nest or den.

Infancy is a crucial time of development—of physical growth and of learning, developing social skills to interact with others and learning life skills such as what to eat and how to respond when predators are near.

Infancy is also a time of brain development. In mammals, only some behavior is hard-wired in their brain as a fixed-action pattern. Much behavior is genetically determined only as potential behavioral systems that must be activated and developed. These include: 
the development of perception
establishing norms for the body
the programming of early experiences into patterns of behavior
the ability to identify others within one’s own group as individuals feeling and responding similar to themselves— mirror neurons are involved in this.

With their increasing size of neocortex, primates and especially humans, have progressively more complex social behaviors. Nursing is an integral part of this, and serves four functions:
it provides food
it helps the mother and infant stay together—in proximity—for the infant’s protection;
it allows the infant to observe and interact with its mother and learn through that experience.
the mother's milk carries antibodies. This gives temporary protection against some infections, until the child's own immune system has matured.

If the infant is part of a litter it plays with its littermates; if it is a single infant, after the first stage of infancy it will begin peer play with other juveniles nearby, close enough for the mother to quickly respond to any difficulty.

Nursing requires proximity; proximity facilitates social interaction, and social interaction is essential for survival. Attachment exists to varying degrees among non-human mammals; it is greatly increased especially in humans. In hunter-gatherer and village-agricultural societies, the mother typically carried the baby or would leave it briefly with an allomother—someone with whom the child will have a life-long relationship such as a grandmother, aunt, or older sibling. Only with the rise of civilization and wealth, and especially within the last 60 years has this pattern of childraising, embedded in our mammalian biology, been significantly altered.

Conclusions: Infant attachment is a multipurpose behavioral system essential to social animals. During infancy patterns of behavior are established on which other long-term relationships are built. Originating in the infant’s protection, the primary purpose of attachment soon became to support brain development. The establishment of homeostasis of physiological systems, social and emotional development and learning are other functions. Infant attachment is found to some degree in all mammals and is greatly expanded in humans. Attachment is a behavioral system that is present at birth but that must be activated and developed.

Overview 
Most of the time, the people who take care of a baby are the baby's mother and father.  If the mother or the father comes when the baby cries and treats the baby with tenderness, the baby learns that the parents will take care of it. If the mother or the father smile at the baby, talk to the baby, sing to the baby, and hold the baby even when it is not crying, the baby learns that the parents love it.  When a baby has learned that it is loved and that it will be taken care of if it cries, it usually grows up to be a person who expects other people to be nice.  When a child feels loved and cared for and thinks other people will be nice, that child is said to be securely attached.

Theories 
Two people were important in thinking about and writing about attachment theory, John Bowlby and Mary Ainsworth.

Bowlby wrote that the care and love a baby gets from its parents cause it to form an important idea. He called this idea the internal working model.  The internal working model is how the baby or child thinks about itself, its parents, and other people.  When parents have taken loving care of a baby and child, it grows up with a positive internal working model.  This child will think that it is lovable, because it was loved.  It will think that the parents are good, because they were caring.  And the child will not be afraid to try to make friends with new people, because it will expect people to be nice.  Children who have a positive internal working model are also likely to be kind to other people.   Bowlby believed that a positive internal working model would help people make friends.

Bowlby wrote that the attachment process in people was like the closeness that exists between mother and baby chimpanzees, gorillas and orangutans.  In people, Bowlby believed that attachment developed gradually, in four steps.

Mary Ainsworth saw how mothers treated their babies in different cities and countries.  She saw that many ways mothers and babies acted were the same, even when families lives were very different. Ainsworth made a way to test how the attachment relationship between a mother and her young child.  She called it "The Strange Situation".

References

Further reading 
 McLeod, Saul. "Attachment Theory." Simply Psychology. N.p., 2009

Human behavior
Babies