How do pili help bacteria?
Pili are structures that extend from the surface of some bacterial cells.
These are hollow, non-helical, filamentous appendages.
(http://socratic.org/biology/molecular-biology-basics/proteins) and look a lot like small hairs projecting from the cell membrane.
Pili are shorter than flagella and they are not involved in motility. They are used to attach the bacterium to the substrate upon which it is living. They are made up of special protein called pilin. True pili are only present on gram negative bacteria.
They are primarily involved in the mating process between cells called conjugation in [bacteria].(http://socratic.org/biology/microorganisms/bacteria). This is when genetic material is transferred from one bacterium to another in a sort of sexual way.
they also help in movement of the bacteria see the video belows which explain how pili are used for movement