If the pain was sudden in onset after workout, you can apply ice packs over the area for 10-15 minutes, 3 to 4 times a day, If still not relieved or is much severe, then a good analgesic with a muscle relaxant may be required only after proper assessment by a physician.
Along with it gentle stretching of the thigh muscle which is injured would help. This again will require an assessment
Hydrate yourself well with adequate rest.
Whenever you start exercises after a long gap, start with a lower intensity, speed and duration, with adequate warm up and cool down
Next Steps
You can either consult online or visit any Rehab and Physical Medicine Physician/Specialist or Pain Physician
Health Tips
Do not work out untill your spasm is completely relieved