It may have just been a boil that's healing up. When did you first notice it and what was its' condition then?
If you don't have a deep abscess that needs to be cut & removed, I'd try using triple antibiotic ointment on it to see if it heals up on its own.
If you don't see improvement in a day or so you may need to do a course of antibiotics to knock it out. I'm more of a fan of the topical approach because if it's not badly infected (feels hot to the touch & sore), it's probably on the mend.
Bumps on the leg are often caused by either sweating + heat + bacteria getting into hair follicles or pores...then getting infected. Women have more problems than men because they shave their legs and often nick themselves without realizing it....that gives MRSA and other similar bacteria an opportunity to dig in and cause bad infections that require serious antibiotics. Avoid taking these whenever possible.