Thanks for writing to the forum!
There are two main possibilities. One is that it is an infected hair follicle causing a boil. The other is that it is an infected lymph node. A lymph node is a part of the lymphatic system that tries to capture that infection. In the process it swells due to proliferation of infection fighting cells.
“Lymph nodes can become swollen from infection, inflammatory conditions, an abscess, or cancer. Other causes of enlarged lymph nodes are rare. By far, the most common cause of swollen lymph nodes is infection.
When swelling appears suddenly and is painful, it is usually caused by injury or an infection. Enlargement that comes on gradually and painlessly may, in some cases, result from cancer or a tumor.”
The confirmation is done by either an excisional biopsy or by fine needle aspiration cytology. Some doctors prefer to do a CT scan.
In female a breast examination for a lump must be done for all lymph nodes in the armpit.
Hope this helps. Please let me know if there is any thing else and do keep me posted. Take care!