Opill works by thickening the cervical mucus, which helps block sperm from reaching the egg and by preventing the ovaries from releasing eggs in some cycles.