The log was a device to measure a ship's speed through the water.
The earliest log, invented around 1620, consisted of a float designed to assist towing, but it was fitted so that it could be tripped for recovery, a sand glass, and a line marked with a knot at intervals. The float was thrown overboard and allowed to drift astern until the first mark or knot in the line was reached, at which time the sand glass was inverted.
Now, the number of knot marks that passed over the stern were counted until the sand finished running out. Based on a nautical mile (i.e., 2,000 yards as opposed to 1,760 for a statute mile on land) the knots tied in the line were 47.5 feet apart, and the time interval was 28 seconds, so that the number of knots passing over the stern represented the speed of the ship in nautical miles per hour. The length of the line between each tied knot, bore the same proportion to the nautical mile as the interval to each second does to one hour.
Thus, the word knot is used to delineate the ship's speed in nautical miles per hour had its roots in the early use of the log. It should be noted, when describing for example, a ship's speed as 20 knots, one does not add per hour, as we do on land, to describe a car traveling at 60 miles per hour. The meaning of a knot is one nautical mile per hour.