Swarming is how honey bee colonies reproduce. In the process two (or three, or four) colonies are created in place of the original swarming colony.
New honey bee colonies are formed when a queen bee senses that the hive is becoming overcrowded (a sign of past success of that colony). The queen decides to leave the colony and will take approximately half the worker bees with her, in a "swarm". The first swarm is called the prime swarm. This prime swarm includes the old queen who will have been laying eggs for the colony for the prior 1-3 seasons.
Swarming usually happens in the spring. However, swarms can happen at any point during the producing season and are triggered by conditions inside the hive.
Meanwhile, back in the old hive, the remaining bees will sense the loss of the queen by "smelling" the absence of her queen pheremones. This absence will trigger the bees to raise a new queen by feeding a number very young larvae royal jelly. Though there is generally only one queen in a hive at any given time, the bees will try to raise more than one queen for redundancy and to ensure that at least one survives. The first queen to emerge from her cell will seek out and kill the other queens before they can emerge. Sometimes, a successful hive will cast off a succession of swarms one after the other.
The bees that departed in the swarm will seek out a branch or other outcropping while they look for a new home.
Swarms are usually not aggressive at this stage of their life cycle. The swarm is more interested in finding a new nesting spot. This does not mean that bee swarms will not attack if they perceive a threat; however, most bees only attack in response to intrusions against their hive, and swarming bees have no hive. During this time, the swarm will send out scout bees to look for a suitable location for a new hive. They will seek close places first, so you will see them buzzing around the eaves of your house, looking for a damaged soffit vent cover that will allow them to build a new home in your roof or walls.
You do not want bees nesting in your roof or walls. If you have them in the structure of your house, and they have been there for more than a week, you should remove the comb from the structure. A professional can "cut out" the hive from the wall and remove the comb. This process is difficult and unpleasant for everyone involved. However, if you do not remove the comb and instead just kill the bees with pesticide or seal up the egress, the dead bees and honey and wax will become a food source for rodents and vermin.