It sounds like you have some type of infection. It may or may not be related to sexual activity. Regardless, you need to see a doctor to find out what it is, especially to exclude any possible STDs. I doubt it's a very serous infection, but you still need a doctor to treat it.
It could be a urinary tract infection. I checked on other sites and people with similar symptoms had been diagnosed with inflammation of the prostate. I don't think this is something you can diagnose or treat on your own. I suggest you see a doctor about this. They will probably want to rule out STDs.