Clomiphene is primarily used to treat female infertility by inducing ovulation in women who do not ovulate regularly. Clomiphene works by stimulating the pituitary gland to release hormones that promote the growth and release of eggs from the ovaries.