Instead of one complex robot, a swarm uses many simple ones that follow local rules and react to their neighbours. No single unit is in charge; useful group behaviour emerges from many small interactions, much as it does in colonies of insects.
This makes the group robust, since losing a few units does not stop the whole, and scalable, since adding more does not require redesign. The difficulty is designing local rules that reliably add up to the behaviour you want, which is far from obvious.