A nav cube was a molecular recording device in the form of a small dark plastic cube, which could be inserted into a starship's navigation computer and, when activated, direct the starship to the cubes pre-programmed encoded location. Once underway, the crew of the starship would be informed of the general direction they were traveling in, but not when their course would change or their intended final destination.
In 2277, Fleet Admiral Karis Tatenen and his staff came aboard the USS Enterprise on a top secret mission. Tatenen supplied Admiral James T. Kirk with a cube bearing the seal of the Emperor of Miradi, which was then inserted into the ship's navigation computer. After a few days, the Enterprise arrived in orbit of Pollox IV. (TOS - Star Trek II Short Stories short story: "The Blaze of Glory")