Written by Emily Nagoski, Ph.D.
Some background: the attachment system is an adaptive mechanism whereby humans experience a social bond with others. It helps us survive infancy and it ties us to our adult romantic partners.
The way we attach to others in adulthood is shaped by the way we are parented. There might also be some temperamental proneness to particular attachment styles, but the stuff I'll talk about now is the parenting stuff.
Very, very briefly, we attach securely when our adult caregivers (usually parents) are pretty reliably there when we need them. We cry, they come. We turn around, they're there. Under these conditions we learn that our adult caregiver will come back when they leave; they will not abandon us. So when we're frightened, we know we can go to them and be protected.
The abandonment thing is crucial: remember that infants' lives literally depend on their adult caregiver coming back. So it's a serious thing in an infant's life, figuring out how to cope with potential abandonment.
We attach insecurely when our adult caregivers are less reliable. If they're under extreme stress or have lots of other children to take care of or have an active drug or alcohol addiction or have a mood or personality disorder, they won't necessarily be there when the infant needs them, and if they are there, there's no guarantee they'll be in a helpful frame of mind.
What all this boils down to are three primary styles of attachment:1
(It's all quite a bit more complicated that that, but this is plenty to be getting on with.)
If you're an anxious or avoidant style person, I recommend David Richo's wonderful How to Be an Adult, which simply, frankly and gently lays out the steps to sorting out your shit so that you can have relationships with people. When I was doing my clinical internship, I recommended it to my clients and they all liked it a lot. Richo uses the language of "fear of abandonment" and "fear of engulfment," which roughly parallel anxious and avoidant attachment styles respectively.
It's not only your own attachment style that matters in relationships though. Your partner's style matters just as much, and your own style may change your tolerance of your partner's style. For example, my birthday wish song says, "You must attach secure or slightly anxious..."" which is ungrammatical for scanning purposes, but the point is I can't cope with an avoidant style in my partner; it makes me crazy.
Why? Because I fall on the anxious side of secure, and when anxious meets avoidant, you get... well, the interaction between the two styles plays a role in the overall dynamics of the relationship. You might be able to imagine the mess that emerges.
1. Birnbaum, G. E., & Reis, H. T. (2019). Evolved to be connected: The dynamics of attachment and sex over the course of romantic relationships. Current opinion in psychology, 25, 11-15.