Pilus are thread like structures which are present on the surface of the bacterial cell.
They are mainly responsible for attaching the bacterial cells to a substrate, for obtaining food or to an eukaryotic cell for the purpose of infection.
Pilus also mediate the process of conjugation in some bacterial cells.
Conjugation is a process by which genetic material or plasmids are transferred from one bacteria to another through a channel formed in between the two bacteria by the help of the pilus.
Pilus also helps the bacteria by preventing them from getting recognised by the immune cells in the host.
A defective pilus will affect all the above processes, resulting in death of the bacteria.