What should I do if I think I have tendonitis?

I have a knot in my back and from looking at anatomical pictures it looks like a tendon that hurts. It hurts when I touch it and it "clicks" when I move my arm a certain way and when I do exercise. Should I stop exercising? What kind of doctor should I see? How would tendonitis be treated if that is the cause? Thanks
Thanks, I do go to a gym, and that’s how I noticed the problem.