This is often caused by a muscle pull or muscle irritation. It can also be due to an irritated nerve or, in some instances, pleurisy. In each case the initial treatment would be the same, which is pretty simple: it should respond, in any of these cases, to non-steroidal anti-inflammatory drugs such as ibuprofin (Advil) or naproxyn (Aleve).

If this approach doesn't resolve the problem and it's really disruptive, then by all means have it checked by a physician. However, it's a pretty common complaint and most often will respond to one of those over-the-counter meds.