It's all part of the normal cycling in what is a monthly preparation for implantation of a fertilized egg. When conception doesn't occur, the cycle begins anew by casting off the old layer so as to build up a new one. The disease of endometriosis is when endometrium or endometrium-like tissue is in other places besides the uterus. Since it is a very hormonally reactive tissue, and since it isn't discarded away on a tampon to the outside world, it can sit in a woman's pelvis and thicken and shrivel cyclically with no way out. Besides the bloody inflammation, there are other chemical irritants that not only contribute to the inflammation, but also can retard the normal conception process.
Infertility is one of the big tip-offs of endometriosis.
Although pain is a famous component, some cases of endometriosis have no pain at all. There are two main routes of infertility at the hands of endometriosis. One, as mentioned above, is the inflammatory and humoral disruption of a conception-friendly environment. The other is adhesion formation that may kink a fallopian tube or put up a mechanical barrier between the ovulating ovary and the tube which would normally carry the egg toward conception at mid-tube. Endometriosis is a terrible disease for many reasons.