
Given what you say this most likely has been the ingrown hair follicle that has started this off - with any lumps and bumps like this on the penis you need to treat them with liquid antiseptic (not cream or ointment). If you live in the UK get a small bottle of TCP, it really stinks but it sure does the job.
Wash your hands and this area of your penis first then get some of the TCP on the end of a finger and dab it directly onto the wound - to start with you need to apply this at least 3 or 4 times a day for the first 3 or 4 days, when it first begins to heal you can reduce the amount of liquid antiseptic to 2 or 3 times a day. When the wound looks like it has almost healed still apply the liquid antiseptic once a day, or at least every other day until the wound is completely healed.
Should the wound refuse to heal seek the help of a pharmacist or a doctor …