A single agent takes a goal, breaks it into steps and works through them with tools. A swarm runs many such agents at once on the same project. Some plan and hand out tasks, some take one task each and work on it until it is done, and a further agent decides at the end of each cycle whether the work should go on.
The hard part is coordination. Cursor reported that when its agents shared files through locks, they held the locks too long and twenty agents slowed to the throughput of two or three. When they worked freely and fixed conflicts later, none took responsibility for the hard problems. A layered hierarchy of planners, workers and a judge was what held up.
A swarm is only as reliable as its referee. It works well where a cheap, automatic test says whether the output is right, such as a compiler or a set of standards. Where no such test exists, the judge is another agent, and the person who set the goal and accepts the result is the only independent check left.