DMPA works primarily by inhibiting ovulation, which means it prevents the release of an egg from the ovaries. Additionally, it thickens the cervical mucus, making it more difficult for sperm to enter the uterus, and alters the endometrial lining to make it less suitable for implantation.