Your profile details are that you are a 61 year old female. The profile is not always correct.
If you are a 61 year old, it is highly likely that you have some form of arthritis. It is probable that you may have caused some damage in the muscles and tendons due to the leg exercises by overdoing things. And like flipper336 mentions, you do not say for long you have had this pain.
Pain in the groin area can be from hip or lower back problems, especially if you a degenerative arthritic condition (osteoarthritis or rheumatoid arthritis).
Because of that, I would suggest you make an appointment to see your doctor, who may like to order imaging (xray) of your hips and lower back to see what is going on with the bones.
Depending where in the groin the discomfort is, there is a possibility of it being a hernia. It is difficult to say, so that is why I suggest you see your doctor for a proper examination and diagnosis.
In the mean time, don't do any more vigorous exercises and take things slowly to allow healing.
Ibuprofen is an anti-inflammatory and can cause stomach bleeding. If you decide to use this type of medication, make sure that you do take it with or after food to protect your stomach. Sometimes a doctor that prescribes this type of medication for you, may also prescribe a stomach medication like omeprazole. Always follow the directions on the packet.
You can take normal pain relief medication, as prescribed on the packet.
Let us know how you get on.
It kinda depends on what you mean by a while ago. If you are only talking like a day or two then yes it is possible you pulled something while exercising. But if it was any longer than that I would have to say no.
Depending on your pain level and how long this has been going on you should make an appointment to see your family doctor. I personally would wait a couple of days to see if it starts to feel better, but then that is just because I don't like going to the doctors.
I would say your groin pain is probably over use of your legs and upper thighs were your groin area is.
My recommendations to get rid of the pain would be to take a break from the leg exercises for about a week or two, so you don't strain it even more. Use a warm heat compress to help and you can also use some muscle rub too. Also over the counter ibuprofen would help with the groin pain.
If it doesn't get better within a week or two, I would suggest going to your doctor.
It should go away in a week or two
if you stay away from leg exercises for a week or two
Use muscle rub
Use a heat compress and maybe an ice pack
Take some ibuprofen
Elevate your leg for 10-30 minutes maybe an hour to see if that relieves some of the groin pain.