There are many reasons why problems in period regularity happen. In some cases, the cause may not be found and hints it is called as dysfunctional uterine bleeding - DUB.
Ovary produces mainly oestrogen and progesterone in rhythmic fashion which maintains the regularity of the menstrual cycle. Disturbance in this regularity leads to irregular periods. Few examples are PCOS, thyroid problem, age related or also known as premenopausal / menopausal hormonal changes. These can be diagnosed by some blood test as well as appearance of ovary on ultrasonography
Structural problems like fibroids, polyps in the uterus, endometriosis cysts etc. can lead to heavy and painful periods. This can be diagnosed by ultrasound or saline sonography or outpatient hysteroscopy.
Pre-cancerous or cancerous changes on the cervix or uterine lining
/ endometrium can I also result in abnormal bleeding. This can be
diagnosed by taking the sample from the cervix known as pap smear
and sampling from the endometrium / inner lining of the uterus.
These samples of them send for his to pathological examination
which is diagnostic and normally the reports come in a week or 10
days' time