Hello,
It is usually caused by sexual act where in bacteria is transmitted causing infection of uterus, or Fallopian tubes and ovaries . Which in turn can lead to infertility.
Or can transmitted by undergoing interventional procedures like Abortion, Copper t insertion .
You need to first undergo , certain test , and then once they find the type of bacterial infection you be treated accordingly .
Next Steps
Visit a Gynaecologist who can evaluate completely and treat .
Health Tips
If married , get your husband also to be evaluated . Practice safe sex . Use condom till you completely recover.