Sore and not sure if you should apply a cold or heat pack to that boo boo?
Typically, if the injury is fresh (you sprained or pulled something) the muscle is inflamed. You want to reduce the inflammation and blood flow to the area. In this case you want to apply ice. Try doing it twice daily for about 15 minutes. It also helps to take an anti-inflammatory like an ibuprofen.
On the other hand, if the pain is chronic (like skeletal pain and stiffness) you want to increase blood flow and oxygen to the area to induce healing. Heat therapy works best in this case.
In the case of menstrual cramps, heat seems to be most affective.