First, everyone's advice about a doctor visit is excellent: one reason I always tell folks on this forum to see a doctor (PA, NP, etc) is a physical examination is crucial to a diagnosis. But there are some things in general that usually hold true: pain usually indicates injury, 'working through' pain usually worsens injury, gain is usually NOT achieved through pain (despite anything your high school coach told you
Pain in a shoulder can mean anything from arthritis (inflammation of the joint), tendonitis (inflammation of the tendon that connects muscle to bone), bursitis (inflammation of the fluid-filled cushion inside the shoulder joint, tear in the rotator cuff, etc. It can happen from too much repetetive motion, from too great a load/stretch placed on a muscle/joint, or a combination of things.
Sometimes day to day activites can cause the pain, usually it is either an increase in them, or a new thing added (hence one may have had some shoulder pain from say, dusting or cleaning windows, which became much worse with lifting weights, and when treated with say an anti-inflamatory and stopping weights got better). Usual treatment for almost everything is some sort of anti-inflammatory medication (unless you are allergic or have a history of asthma or ulcers) and rest it until better. Depending on what is wrong, sometimes physical therapy is used. But rest is a key ingredient.
Once you go back to an activity after rest, I warn patients that they should expect to start out at a lower level of training than they had, and gradually GRADUALLY build back up. I give them a rule of thumb that it should take them twice as long to get to the level they were at when they stopped as the amount of time spent out of the activity: eg, for 3-4 weeks of rest assume 6-8 weeks of slow build up back to the level you were at when you stopped. I think reinjury is one of the biggest risks, exceeded only by increased injury from 'working through' pain.
Finally, if you are any sort of medication, it is wise to discuss 'routine' dojo aches with your doctor, and if given new medication, make sure your doctor knows you do a MA. I shuddered last OCT when everyone and their brother hit up the family doc for Cipro...how many patients knew it carried an increased risk of tendon rupture while using it? Another member of my dojo was on a cholesterol lowering medication, and for some time put off discussing his muscle aches with his doctor because he thought they were due to restarting Aikido after a break; instead, they were due to his muscles being damaged by his medication. Pain that is more than minor and/or persists is always a good reason to discuss your problem with your doctor.