Much has been learned about bee behavior in recent times. LL Langstroth, sometimes referred to as the 'Father of Beekeeping', discovered the principle of the 'bee-space'.
He found that bees will usually fill gaps less than ¼ inch wide with propolis and larger than three eighths of an inch with comb. This had the effect of making the removal of combs built into frames very difficult.
In his 'Removable Frame Hive' he left precisely ¼ inch space between the ends of the frames and the sides of the hives, and between the top and bottom of frames in stacked boxes, the frames could be easily removed for inspection and of course extraction of the honey.
The Langstroth hive is used almost universally in America today. In fact in many states it is illegal to keep bees in anything other than a removable frame hive, to allow for inspection.
The thing everyone thinks about when talking about bee behavior is the sting. Bees most often sting to defend the whole colony. If a bee is collecting pollen or nectar, going about its usual buzziness, it's unlike to sting anyone.
Most behavior and the bees' communication is through pheromones, but they also use a fascinating waggle dance which gives the other worker bees where to find a good source of forage. Pheromones are used within the hive to tell the workers what type of cells to make in their combs, when to defend the hive, even when to create a new honey bee queen.
When a colony swarms, they cluster on a branch or other convenient 'muster point'. The cluster is gathered together by the pheromones emitted by the queen, the swarm follows her to the new chosen location for the hive and the workers stand at the entrance with their head down, rear in the air, using their Nasonov pheromone gland to attract all the flying bees into their new home.