Perforin is a protein produced by cytotoxic T cells and natural killer (NK) cells that plays a vital role in the immune response by forming pores in the membranes of target cells. This pore-forming ability allows for the entry of granzymes, which are enzymes that induce apoptosis, or programmed cell death, in infected or cancerous cells. The action of perforin is essential for eliminating threats to the body, highlighting its importance in innate immunity.