Honey bee swarming is a natural process, but there are many things a beekeeper can do to prevent it. Carefully managing colonies so they always have right amount of resources is a big part of avoiding swarms - they need ample space, not too many queen cups for raising new queens, etc.
However, sometimes it happens anyway.
Last spring I thought I was managing my colonies by performing splits (splitting one hive into two rather than letting them swarm on their own). One of the older queens I split left her new hive anyway and since I was lucky enough to be around the day it happened, I got three hives instead of two!
In this video you can see the last of the small swarm working their way into the new hive. I found them just as a thunderstorm began, so by the time I actually got to collect them they were wet and cold - but they made it and appear to have overwintered well.