PD-1 inhibitors and PD-L1 inhibitors are used to treat many types of cancer, including melanoma, non-small cell lung cancer, and kidney cancer. They also have other uses, such as treating bladder cancer and head and neck cancers. These medications work by blocking the interaction between PD-1 (programmed death-1) and PD-L1 (programmed death-ligand 1) in the body, which helps your immune system attack cancer cells more effectively. PD-1 inhibitors and PD-L1 inhibitors are typically given as injections. Examples include Keytruda (pembrolizumab), Opdivo (nivolumab), and Libtayo (cemiplimab). These treatments can help your body fight cancer more efficiently.