The captain, also known as Billy Bones, is a man with a mysterious past. Over the course of the first several chapters, Jim comes to discover just what kind of a man the captain is.
In the third chapter, the captain confides in Jim as the old pirate lays ill in bed. He tells Jim that he was Captain Flint's first mate. Cryptically, he adds that he is "the only one who knows the place." At this point, Jim does not know what the captain is referring to. We later learn that the captain was talking about the place where the treasure is hidden.
As the sole surviving pirate with knowledge of the treasure's location, the captain is a wanted man by the other pirates. As it turns out, a group of pirates, led by the blind man, raid the inn. However, they fail to find what they are looking for.
In chapter 6, Jim discovers that among the papers that he took from the captain's chest is a map. It becomes clear that this is what the pirates were after. It also seems that this is a map to the secret place that the captain was referring to shortly before his death. As a guardian of this secret, Jim, along with Doctor Livesey and Squire Trelawney, decide to charter a ship and go in search of these hidden riches.