Perforin is a protein that plays a crucial role in the immune response. It is primarily produced by cytotoxic T cells and natural killer (NK) cells. Perforin forms pores in the membrane of target cells, facilitating the entry of apoptosis-inducing enzymes such as granzymes. This mechanism is vital for the elimination of virally infected cells and cancer cells.