There are different ways that will rid one-self of a spirit attachment. Meditation and prayer are one, sea salt baths are another, smudging (burning sage), and spiritual blessings.
If the above do not help, sometimes professional guidance or help mist be sought out. It just depends on how strong the attachment is.
Author/Founder of Historic Haunts Investigations