The diaphragm and the cervical cap are cup-shaped devices that are inserted into the vagina. They protect against pregnancy by covering the cervix and keeping sperm from meeting the egg.