A ship's progress was measured by tossing overboard a wooden board (the log) with a line attached. The rate at which the string was payed out as the ship moved away from the stationary log was measured by counting how long it took between knots that were tied in the string. These measurements were then entered in a book. Hence we get the term 'log-book' and also the name 'knot' as the unit of speed at sea.
Now I can download a free app on my phone and get instantaneous speed feedback. Nice.