The best thing to do is to rest the injury and ice it. Try to elevate the legs/area so that it can allow circulation to the area. After icing, compress the area by wrapping the thigh.
If you place a warm cloth on the area it should help with the pain. Also if you take some pain medication then this would help. Finally, it may be neccessary for you to visit a doctor to get pain medication.