Primary dysmenorrhea is painful menstruation without an identifiable medical cause, typically involving uterine cramps caused by prostaglandin-induced contractions. It most often occurs during the first two days of a woman's period. Secondary dysmenorrhea is painful menstruation due to an underlying pelvic or uterine issue, such as endometriosis, adenomyosis, fibroids, pelvic infection, an IUD, or a congenital abnormality. The document discusses the causes and types of dysmenorrhea, or painful periods.