Fimbriae and pili are filamentous structures composed of protein that extend from the surface of a cell and can have many functions.
Fimbriae are found in gram-negative as well as gram-positive bacteria but are shorter in length as compared to pili. Pili are longer than fimbriae and there are only a few per cell.
Fimbriae are responsible for cell to surface attachment. Specialized for attachment i.e. enable the cell to adhere to the surfaces of other bacteria.