Let's say a car is traveling along the highway at a constant speed. That means its transmission and driveshaft are rotating at a speed that corresponds to the vehicle's speed. It also means that the mandrel in the speedometer's drive cable— because it's connected to the transmission via a set of gears— is also rotating at the same speed. And, finally, the permanent magnet at the other end of the drive cable is rotating.
As the magnet spins, it sets up a rotating magnetic field, creating forces that act on the speed cup. These forces cause electrical current to flow in the cup in small rotating eddies, known as eddy currents. In some applications, eddy currents represent lost power and are therefore undesirable. But in the case of a speedometer, the eddy currents create a drag torque that does work on the speed cup. The cup and its attached needle turn in the same direction that the magnetic field is turning— but only as far as the hairspring will allow it. The needle on the speed cup comes to a rest where the opposing force of the hairspring balances the force created by the revolving magnet.
What if the car increases or decreases its speed? If the car travels faster, the permanent magnet inside the speed cup will rotate faster, which creates a stronger magnetic field, larger eddy currents and a greater deflection of the speedometer needle. If the car slows down, the magnet inside the cup rotates more slowly, which reduces the strength of the magnetic field, resulting in smaller eddy currents and less deflection of the needle. When a car is stopped, the hairspring holds the needle at zero.