Without the benefit of an exam it is impossible to say.
Could be a pulled muscle, inflamed or pinched nerve, painful varicose vein or a more serious condition such as a blood clot. If worse with walking could be peripheral arterial disease involving a blocked artery. See your doctor asap!
Would you like to video or text chat with me?