Officially these are called Type III secretion systems, as they allow the secretion of toxins (and other things for that matter) from the cell. They occasionally fall off the bacteria allowing very detailed electron microscope pictures to be taken, showing that, whatever their official name, they do look a lot like little needles.
Image A shows the imprint of the needle on the bacterial cell surface. Image B shows the isolated needles, showing their structures (which are wonderfully detailed and quite beautiful). Image C shows a drawing of the proteins involved in the structure within the cell membrane. Scale bar is 100nm.
In infectious organisms this secretion system is vital for survival, but it's interesting to see how it's used in organisms that are only opportunistically infective, such as Pseudomonas aeruginosa. P aeruginosa is an opportunistic pathogen, it can survive fine outside the human body, but in cases where it gets a chance to invade (particularly in the lungs of people with cystic fibrosis) it will go for it. Where it inherited the needle complex from is not clear, although it is thought to have distantly evolved from flagella and been passed to the pseudomonas by horizontal gene transfer from another bacteria.
Removal of the needle complex does not prevent P aeruginosa from invading and infecting an organism, but it does make the infection slightly less virulent. Work on acute pneumonia has started to build up a model of how the needle works, and what role it plays in infection. The bacterial cells invade the epithelial tissue in the human host at points where it is damaged (i.e by cystic fibrosis). As non-damaged epithelial cells are usually quite resistant to the bacterial colonization, it is only when the lung tissue is already injured that the Pseudomonas can take hold.
Once P. aeruginosa has colonized the damaged tissue surrounding macrophages and neutrophils will gather at the site of infection. These merely further damage the surrounding tissue, without harming the bacteria allowing it to settle and grow. Only then does the needle start pumping out damaging toxins, which lead to the symptoms of pneumonia. In a severe infection this can lead to a breach of the tissue barrier between the lungs and the blood stream, which goes on to cause systemic bacteria infection and rapid septic shock. The removal of the needle complex can therefore stop some of these more extreme reactions, but does not prevent the infection starting in the first place.
Hauser, A. (2009). The type III secretion system of Pseudomonas aeruginosa: infection by injection Nature Reviews Microbiology, 7 (9), 654-665 DOI: 10.1038/nrmicro2199