As soon as possible apply ice to the hamstring and elevate it with some pillows or cushions. After 20 or so minutes of ice apply an elasticated bandage to decrease swelling. Now simply rest, you may have to rest for 2-4 weeks. Remember to stretch next time! The most common cause of hamstring injuries is not warming up before running.