there's normally a drive gear on the gearbox output shaft (that turns in proportion to the speed of the driven wheels) that turns the cable. the cable then turns inside the speedo where some clever stuff happens to turn against a spring to represent the speed. can't explain that bit.