Pathogens infect cells through several mechanisms. Viruses often attach to specific receptors on the cell surface and enter the cell via endocytosis or membrane fusion. Bacteria can invade cells using specialized appendages like pili, or through secretion systems that inject toxins directly into the host cell.