The full title is "Harbor Pilot" but Larry and LHP have it correct. The Harbor Pilot is someone who is very familar with the local waters and comes on board to either assist the captain or take over the navigation completely while docking.
The New Orleans port is probably the best example of where this is a mandatory thing. The trip from the dock to the gulf is entirely on the Miss. river. Which causes changes in sandbars and such constantly, so the pilot stays on board until they reach the gulf.
You will see them pull up to the ship in a little motor boat with "Pilot" written on the side. When you leave Galveston you can also see them leave the ship when you depart from the port.
Carnival Cruise Lines:
Fantasy 90, Celebration 95, Victory 05, Conquest 05, Spirit 6/06, Freedom 6/08, Holiday 7/08, Victory 6/09, Valor 9/09, Dream 6/10, Splendor 8/10,Conquest 8/11,Magic 11/11,Triumph 4/12,Spirit 7/12,Freedom 11/12, Triumph 2/13 - The fire cruise, Magic 1/14, Freedom x 2 6/14
NCL Dream October 2006, RCCL Mariner OTS June 2007, Celebrity Silhouette 2013