Monty, First google boils, and look at images, if there like yours then thats what you have, have a look down the matches and see if theres a NHS one, there pritty good, and take it from there.
If its not like a boil, try herpes, and do the same.
Good Luck
If it could be herpes, it might be that. It's also possible to get pimples on the penis. I guess the basic question is, does it look like a pimple or a cold sore or a wart? Search for photos of each to compare if you're not sure. Or describe it in more detail.
A hard lump under the skin sounds like a cystic acne nodule, so a pimple would be my first guess, but you really didn't say enough to have any real idea.