Keytruda works by blocking the interaction between PD-1, a protein on T cells, and its ligands, PD-L1 and PD-L2. This blockade releases the "brakes" on the immune system, enabling it to attack cancer cells more effectively. Keytruda has shown significant efficacy in treating advanced melanoma, non-small cell lung cancer (NSCLC), and other malignancies.