I had this once, and when I went to the doctor, it turned out to be an ingrown hair. My doc rec'd using men's triple blade razors because apparently they "work better" than women's razors, and the closer shave helps prevent this sort of thing.
She was right about using men's razors, and now I also use them on my legs. (and never got the underarm lump again, either).