A diaphragm is a shallow, flexible cup that is used as a barrier contraception. It is inserted in the vagina to cover the cervix during sex to prevent the sperms from entering the cervix and fertilizing the egg.
This method doesn't protect against STI and hence condoms should be used to protect against STIs.
Sources:
https://www.healthline.com/health/birth-control/diaphragm
https://familydoctor.org/birth-control-how-to-use-your-diaphragm/
https://www.nhs.uk/conditions/contraception/contraceptive-diaphragm-or-cap/