Muscle strains should heal within a few days, week or two max if it's bad. Taking anti-inflammatories will take the pain away but won't do anything to help it heal. In fact there is a point of view that they actually interfere with the healing process (inflammation is part of the way your body heals itself). Whatever you do, don't use the painkillers to help you train while you still have the injury because you'll just end up making it worse. Probably the best thing for muscle strains is active rest. Do exercises that put the affected area through it's full range of motion but do them at a
very low intensity but on a regular basis. You shouldn't make yourself feel any pain, you just want to stimulate the injured area and get blood flowing to it. Self-myofascial release (SMR) is great in the later stages of an injury like this too, check out the guide that was written in the h&f forum:
http://forumserver.twoplustwo.com/85...dback-1209610/
Of course all this info is based on it actually being a muscle strain. There are tons of other injuries that all have their own treatments, although active rest and SMR is good for the majority of them.