Good video from Symantec with a simple demonstration of how the Stuxnet virus could actually modify the program being fed to a PLC controller. A PLC controller is simply a programmable driver that runs a motor or other industrial device.
In the example, an air pump is connected to a PLC and programmed to run for 3 seconds. The motor correctly runs for three seconds, then shuts off. Once a modified DLL file is used, simulating a Stuxnet attack, even though the pump is told to run for three seconds by the program, it runs continually.
The real Stuxnet virus would run Iran’s processing motors at high and low speeds while still displaying to the control console that the speed was constant. This in effect ruined the process of refining the fuel and also damaged the motors.