Coughing should only cause groin pain if you already have a hernia present.
Because coughing causes pressure in the abdomen, it could cause the internal tissue affected to push through the muscular sacks that envelope them.
The most common causes of groin pain are Hernia, kidney stones and contact sports.
There are some less common ones too, such as inflamed testicles, swollen lymph nodes, urinary tract infection and inflammation in the gut.
Make sure you get to see the GP immediately if you see blood in your urine or the pain spreads more generally around the abdomen or lower back but the chances are you've just strained the area.