Could be a zit, ingrown hair, or just a basic benign cyst. I've had a few cysts on penis shaft before. After a shower they softened and I pretty much just squeezed one and a white ball came out, sort of like a clogged pore or zit would. I had a dermatologist appointment the next day anyway, so I did nothing to the other two. He said they were cysts and removed the other two. The one I popped healed in a couple days, and the ones he did took a couple weeks to heal completely.
Only a doctor can really tell you what it is.
On a side note, if you go to gyms it's wise to wipe down equipment before and after use. Maybe even use a disinfecting spray if the gym will allow you to. A non-chemical spray would be best, such as vinegar or hydrogen peroxide or some other alternative disinfectant. Use a different towel from the one you use to wipe your body with. Not a terribly big deal, but better safe than sorry.