I have problem with the skin at the tip of my penis.

How to check yourself? 

Look at the head of the penis and the skin covering the head of the penis (foreskin) for signs of inflammation and possible infection:

  • Swelling
  • Redness (in people with light coloured skin)
  • Water/bloody/pus-like discharge

If you have one or more of these symptoms, you should seek advisefrom a healthcare worker[l1] .

If I cannot pull the foreskin forward and backward, could I have a problem in having sex?

You could have discomfort and pain when having sex, if your foreskin cannot be pulled easily over the head of the penis and back again.

Why did I get this infection even though I did not have sex?

Some kinds of genital infections are sexually transmitted, some are not. What you have is not appear to be a sexually transmitted infection. It appears to have occurred because the foreskin is stuck to the head of the penis, possibly because of scarring, and needs to stretch to separate it.