The usual cause of a pea-size growth is an enlarged lymph node. This can happen if there is a viral or bacterial infection anywhere in the lower part of your body. However, what you are describing sound more like an infected hair follicle. That can become an open sore when it opens and drains. If you are having these often, you should see a physician; special soap may be helpful. Meanwhile, if this becomes a sore before you can get to the doctor, neosporin can help keep it from getting infected.
Let me know if you need further information. Please remember to click the accept button if this information is helpful. Thanks. JeanRN