Thanks for your query.Based on the facts that you have posted it appears that you have what is called as Sebaceous Cyst
in the groin.
This area is rich in sebaceous glands and so more prone to get sebaceous cyst due to accumulation of sebum beneath the skin.
Normally no treatment is required as it subsides of its own.However treatment is required if it gets infected or increases in size. You may need to get it excised in Toto under local anaesthesia by a surgeon.