Your likely having shoulder instability issue and your starting to injure your rotators cuff muscles. Shoulder injures are complex and difficult to self diagnose, so it could really be caused by a lot of different issues (muscle imbalances, posture, equipment).
My simple advice would be to start working on shoulder mobility exercises (google and youtube some routines). You need to test/improve your range of motion first before you can do any serious strengthening of the shoulder. If you experience any sort of pain during the exercises, stop, and make an appointment with a good sports therapist.