Pili--plural for pilus--are hairlike appendages found on the surface of many bacteria. Pili are fragile and need to be constantly replaced. The pili (plural) or pilus (singular)is a biological molecule that is on the surface of many bacteria. It is sometimes described as a hair structure. The term pilus comes from the latin word thread or fiber. All of the pili are made up of oligomeric proteins. The pili is used for different purposes in the cell. It is attached on the surface of cells in order to transfer DNA from cell to cell, attach to surfaces and for general cell-cell adhesion. There are two different kinds of Pili. Short and long. The short is very plentiful around the cell and help the cells colonize environmental surfaces and stick to other cells. This also helps the cells resist potential flushing! The long pili have to do with sex or transfering DNA. This is called the conjugation pili because it helps with conjugation or sex. Conjugation is how a cell transfers DNA to another by contact with the cell. Pili also have implications with bacterial infection. The pili help the bacteria not get flushed by adhesion, and therefore stick to cells and infect. This causes illness due to pili helping bacteria bind to cells. 
During the process of bacterial conjugation, conjugative pili allow the transfer of DNA between bacteria. They are sometimes called "sex pili", in reference to sexual reproduction, because they allow for the exchange of genes via the formation of "mating pairs".
Type IV pili
Type IV pili, generate motile forces. The external ends of the pili adhere to a solid substrate--either the surface to which the bacteria are attached or to other bacteria--and when the pilus contracts, it pulls the bacteria forward, like a grappling hook. Movement produced by type IV pili is typically jerky, but can be a gliding motion as well.
Attachment of bacteria to host surfaces is required for colonization during infection or to initiate formation of a biofilm. A fimbria is a short pilus that is used to attach the bacterium to a surface. Fimbriae are either located at the poles of a cell, or are evenly spread over its entire surface. Mutant bacteria that lack fimbriae cannot adhere to their usual target surfaces and, thus, cannot cause diseases.
- Pilus, November 14th, 2012.