Thanks for your query.Based on the facts that you have posted it appears that you have infection of the urethra
especially external urinary meatus
The cause of the infection may be either bacterial infection or due to vigorous sex or friction against the cloths.
Please take broad spectrum antibiotics after consulting your family physician.
You can apply topical local anaesthetic
gel to relieve pain.
Observe proper personal hygiene by cleaning the genitals with warm water.