According to Wikipedia, swarming is mainly a spring thing, and while it sometimes frightens people, the bees are usually not aggressive at this stage of their life cycle.
The worker bees create queen cups throughout the year. When the hive gets ready to swarm the queen lays eggs into the queen cups. New queens are raised and the hive may swarm as soon as the queen cells are capped and before the new virgin queens emerge from their queen cells. A laying queen is too heavy to fly long distances. Therefore, the workers will stop feeding her before the anticipated swarm date and the queen will stop laying eggs. Swarming creates an interruption in the brood cycle of the original colony.
During the swarm preparation, scout bees will simply find a nearby location for the swarm to cluster. This intermediate stop is not for permanent habitation and will normally leave within three days to a suitable location. It is from this temporary location that the cluster will determine the final nest site based on the level of excitement of the dances of the scout bees.