It’s a great question. There are multiple ways that attachment styles change.
Attachment styles change based on the type of interaction partners have with each other. Two confident people, who treat each other well, tend to grow more confident over time. If you have a partner with a cool style of attachment, it’s easy to become more concerned. And if you have a partner who is concerned, it’s easy to become more cool. If you can change how you consistently interact with your partner (easier said than done), it can change how your partner feels about intimacy.
Also, major life events — including major illness, the sudden loss of a partner, and discovering a major betrayal can change a person’s style of attachment. Being betrayed can make someone who is confident more concerned.
Attachment styles can also be changed through counseling and therapy. Meditation can also help people with a cool or concerned style of attachment become more confident.
Hope that helps.