Ah, that salty breeze blowing over the water! Let's say we sail over to yonder small island and check it out. To know how long it'll take us to get there, we of course need to know how far away it is and how fast we'll be going. We'll measure distance in nautical miles (each of which is equivalent to 1.15 statute miles or 1852 meters, and some portion of which is used in both sea and air navigation), and we'll measure speed using … knots?
Yes, knots. A knot is one nautical mile per hour.
Here's the background on that: Originally ships used log lines with literal knots in them to measure speed. Just like the knots, the log lines were also literal, sort of. Line is the sailor's word for rope (rope can get you thrown overboard), and the log was actually a pie-shaped flat piece of wood (from a log) with a lead weight on the curved edge so that it would float upright. A line with knots about every 47 feet was attached to the "log." The log was tossed overboard and would stay more or less where it landed, while the attached log line would continue trailing out from the ship. After 28 seconds as measured by the sandglass, the number of knots that had passed overboard was counted and the resulting number was the speed of the ship.
(An aside: the speed of the vessel was noted in the book about the goings-on of the log line, aka the "logbook." Logbook got shortened to log, and the log itself was used to record everything about a ship's voyage. Log later came to apply to the full record of a flight by an aircraft, and then to any of various kinds of records of performance, events, or day-to-day activities. When people started chronicling their lives and thoughts online, the word weblog referred to the sites they used and the content they wrote, and was later shortened to blog.)
But back to our journey: we're traveling nautical miles and we're measuring our speed in knots. Our island is fictional, and we don't actually own a boat, but knots are real. And possibly confusing. Our imagined vessel has an electronic device that gives us lots of information including our speed, so we don't need any knotted lines trailing behind us, but when the instrument reports "12" do you say "We're traveling 12 knots" or "We're traveling 12 knots an hour"?
Well, nautically (and strictly) speaking, a knot is a unit of speed equal to one nautical mile per hour, and a vessel is described as traveling at (or "making") a certain number of knots. But occasionally sentences like "We're traveling 12 knots an hour" are heard. In such cases, the word knot doesn't mean "nautical miles an hour." It means simply "nautical miles."
Those in the know do not appreciate such uses, and you might want to avoid it with your sailor friends and frenemies. But if you do happen to say "knots an hour" or "knots per hour" and some seafaring (or word-watching) type implies that it's an offense worthy of plank-walking, you may feel free to point out that this meaning of knot was first entered in a dictionary in 1864, and that it was first recorded a century earlier in the writings of two people who knew their way around a gunwale:
… the ship went ten knots an hour with a prodigious sea....
— Admiral George Anson, Anson's Voyage Round the World, 1748… we were at that time running at the rate of six knots an hour….
— Captain James Cook, Voyages, 1790
Usage continued by others with some experience of the nautical life:
When the ship was running nine knots an hour, these animals [porpoises] could cross and recross the bows with the greatest of ease, and then dash away right ahead.
— Charles Darwin, The Voyage of the Beagle, 1839We were gliding along, hardly three knots an hour….
— Herman Melville, Mardi: And a Voyage Thither, 1849
All of which is to say: those who say "knots an hour" instead of "knots" are in pretty good company—and not just the company of landlubbers.