You may have strained or even ruptured one or more of the tendons to the hamstring muscle. The hamstring is the large muscle along the back of the thigh. It bends the knee and extends the hip.
You didn’t mention any problems with walking. Most people with a strain or complete rupture have trouble walking normally. It hurts to bend the hip and knee. They end up using a stiff-legged gait pattern to get around.
A medical exam would be a good idea. The hamstrings are deep and not easily palpated for tenderness. An ultrasound or MRI may be needed to see if anything has been seriously injured or damaged. MRI is especially helpful to identify what has happened and how serious is the injury.
Most of the time, a single tendon torn will only retract or pull away slightly. Then it reattaches itself to the other tendons. When two or three of the tendons are ruptured, they may even pull away from the bone with a small piece of bone still attached. For the best results, this type of injury requires surgical repair.
An orthopedic surgeon may be the best one to advise you. Conservative care may be all that’s needed. But if surgery is indicated, the sooner it’s done, the better the results will be. Delayed treatment can result in loss of function and strength.