Did you get a direct blow to your hamstring? If yes then it can be trauma to your soft tissues of the hamstring, if not it the muscular spasm that has not yet recovered. I think the following things will help you:
1. Apply luke warm water to the hamstring with the help of a cloth for 15-20 mins.
2. Take a pain killer, like paracetamol
, 2 tablets stat and then 2 tab when it is painful
3. Apply an antiinflammatory cream available OTC, like Diclofenac
4. Take a muscle relaxant