Pilot fish are a variety of typically small to medium sized (though weights may vary on average from 5 to 45 kilograms, the lengths of the fish rarely exceed 60 centimetres) fish whose most well-known trait is likely their tendency to swim along with large species of shark, feeding off whatever scraps of food they can manage to eat without being devoured by the sharks themselves.
For a while, many studiers of marine life thought that pilot fish helped to lead sharks to prey (thus the name pilot fish) but after much study this appears not to be the case. Rather than having a symbiotic relationship with the sharks, as remoras do, pilot fish appear to just be along for the free food. The only reason sharks tend not to eat pilot fish is because the fish have quick enough reflexes to dart out of the way before a shark can bite it. Sharks seem to put up with pilot fish, for the most, unless there are a large number following them around.
One interesting, amusing, and devious method sharks have to rid themselves of too many pilot fish is this: A shark hounded by too many pilot fish for comfort will find another shark with relatively few or no pilot fish following it around. After swimming close to the other shark and acting friendly, the pestered shark will suddenly dart off as quickly as it can, leaving the pilot fish that were pursuing it to now follow the newly met shark about instead.
Sources: http://www.encyclopedia.com/articlesnew/10387TypesofPompanos.html and http://www.radge.demon.co.uk/shark7.html.