When the shoulder starts to hurt, there can be several reasons. It could be a muscle strain, bursitis, tendinosis, or impingement. Impingement is common and is basically when the mechanics of the joint are not working properly and the joint is not moving smoothly, leading to the tendons getting pinched in the process.
However, if your shoulder has been also feeling very tight when you move it and this problem is lingering for a few months, it is possible you have have adhesive capsulitis, aka, "frozen shoulder".
A doctor of physical therapy can help you determine if you have frozen shoulder or one of the other mentioned issues above, so it's important to get it checked out. All 50 states have "Direct Access", meaning you do not need a physician's referral to go see a physical therapist.