Swarming is a natural occurrence in many different types of insect that live in organised colonies, it's is a type of insurance that the colony uses to ensure that the gene pool is preserved for generations to come. For many people (mainly Beekeepers) the sight of a swarm can be one to marvel at, for others it can be a sight that fills them with some trepidation.
Swarming can occur at all times of spring and summer, but mainly late April through to the end of June. The swarm will usually (but not always) leave the hive from late morning through to mid afternoon on warm but not necessarily sunny days. Whilst Beekeepers can do things to avoid bees swarming, there will always be swarms whether they be from a hive or from a wild colony.
The act of swarming may appear to be spontaneous, but it is worth remembering that in order to get to this stage the colony has organised itself and will not leave the hive unless they have ensured the survival of the remaining bees. They will do this by leaving the hive with adequate amounts of brood, eggs, nurse bees, stores and, most importantly, at least one sealed queen cell which when hatched and mated will be the future of that colony.
When the swarm leaves the hive it will consist of the queen and all the flying bees who were in the hive when the swarming process began, this leaves the hive with all the young non-flying bees (nurse bees) and all the flying bees who were out of the hive foraging (worker bees), meaning the hive is somewhat depleted and not what a Beekeeper would want!
The bees that have left the hive will usually settle close by on a low branch while the scout bees fly off looking for a suitable place to set up a new home, before they go the flying bees will gorge themselves on the honey in the hive so that they have a full stomach to sustain them until they have set up another colony which could be a few hours or even a few days. The effect of a full stomach of honey is that the bees become quite calm and therefore very seldom is a swarm aggressive and they seldom sting as they can't bend their tail into its stinging position because their full stomach prevents it. However the longer they are without a home the more of the honey in their stomach is consumed and the more aggressive they become.
Unless you are experienced in the handling of Bees leave the swarm alone and contact your local Beekeeping Association swarm collector who will collect the swarm and rehome them. The Tiverton Branch has a number of Swarm collectors and their details can be found here: Swarm collectors.