This can happen for different reasons.
Can occur if the head of the penis is not kept clean and “smegma” gathers under the foreskin. Balanitis is inflammation of the head of the penis and posthitis when the foreskin is inflamed.
Improving hygiene and daily bathing or washing with a small amount of salt in the water and pulling back the foreskin to clean underneath will help.
Is when the urethra is inflamed. This is usually caused by an STI and requires treatment at a Integrated Sexual Health Clinic (formerly Genito-urinary GUM). Symptoms can be a pus discharge and pain when peeing.
Meatitis is inflammation of the tip of the urethra. This happens if there is irritation from spermicide, other substances or during sex. This may clear or may be an STI, which requires test and treatment.