From the Kingdom Hearts Wiki: A world of information not accessible by Gummiship
Bones float above the ground and they are collected when Roxas draws near. Roxas can only be in possession of one bone at a time and an icon of a bone remains visible above his head for so long as Roxas has a bone. When Roxas is near Zero with a bone, the Attack command is replaced with the "Bone" command. Executing this command causes Roxas to give the bone to Zero, prompting the ghost dog to move to a spot where Heartless are concealed. Examining these spots exposes the Heartless.