Based on [this]( article it sounds like some really talented developers (NSA) wrote a virus that targetted specific computers in Iran and had enough knowledge to target specific computer controlled equipment.

At Natanz, for almost 17 months, Stuxnet quietly worked its way into the system and targeted a specific component — the frequency converters made by the German equipment manufacturer Siemens that regulated the speed of the spinning centrifuges used to create nuclear fuel. The worm then took control of the speed at which the centrifuges spun, making them turn so fast in a quick burst that they would be damaged but not destroyed. And at the same time, the worm masked that change in speed from being discovered at the centrifuges’ control panel.