Attachment means an affectional bond or tie between an individual and an attachment figure. Such bonds may be reciprocal between two adults, but between a child and a caregiver, these bonds are based on the child's need for safety, security, and protection, which is most important in infancy and childhood.
Detachment arises not because we decide to detach. It arises upon thorough comprehension of suffering/stress and its cause. Detachment has nothing to do with indifference or carelessness. Detaching from external things does not mean that we get rid of them.