Maybe you have a muscle strain. Hopefully, not a complete tear. Can you bear weight on leg? If you can, may be severe strain. If it is swollen, doesn't seem to be getting better, may want to see MD or physical therapist. Also, ice for 10-15 minutes two to three times per day, with at least 1 1/2 hours in between icing. Fill Ziploc with ice and wrap with ace bandage. This will help bring swelling down. If it is severe, icing may not help. Icing always helps me. Usually I have knee, foot, or anke pain. However, when I feel slight twing in hamstring (definetly not as severe as your injury), if I ice for 15 minutes, I am usually fine in a day or two. Only my opinion. Hope this helps.
I have just started taking the RICE treatment. Hoping its not too late. And I can walk, but it hurts when my knee bends, or else I don't feel any other pain. The swollen part is still looking the same. There's no color on it. No pain. Nothing! just hurts when try to bend my knee. I feel a bad pull in my quadriceps.