A Golden Rivet refers to the claim in naval folklore that every ship is built containing a single, commemorative "golden rivet", an idea seemingly derived from the commemorative golden spike that was temporarily driven at the completion of the U.S. transcontinental railroad in 1869.
The rivet's location is allegedly different for each ship and undisclosed, known only to the crew. No such rivet can exist, as gold is too malleable a material. If a golden rivet was made, it would be impossible to hammer it in without destroying it in the process.
The prank consists of informing a new sailor of the existence of the "golden rivet" and encouraging him to look for it. After scouring the entire ship without success, it eventually dawns on the junior that he has been the butt of a joke.