These boils are contact allergy. Apply hydrocortisone and take anti allergy tablets. Change razor and don't press hard while shaving. While applying hydrocortisone take care that it should not goes in side urethra.
These sound like ingrowing hairs where the hairs curl when they're growing back and go back into the skin and look like spots. Some hydrocortisone wouldn't be a bad idea but I'm not sure what you can do to prevent them in the future apart from not shaving the area.
It happens if you shave in that area try not to do that no more and pull that ingrown hair better.