Pain's purpose is to tell you to SLOW DOWN.
Of course, many such as myself tend to ingnore pain. Ain't I tough (and stupid at the same time)?
For muscular pain I take ibuprofen, and do an ice massage. The message involves working ice over the affected area to produce a chill in the muscle mass. This is not the most comfortable thing to do. YET, what this accomplishes is a response of the body to dialate blood vessels in the affected muscle to warm the muscle back up. (the first response to cold is vasoconstriction, then vasodialation)
Lactic acid builds in overworked and injured muscle. It causes pain and cramps. By "flushing" the muscle by the above mentioned process, pain is lessened, and healing time is reduced.
This, some ibuprofen, and a couple days rest does the trick. IF pain persists it's time to get to a doctor to have the injury evaluated.