It's a swarm of honey bees, what they're doing is waiting for the swarm's scouts to locate a new home for a hive. When scouts find something suitable, they'll return and do their dance to tell others the locations. Somehow, the swarm decides which one is best and they all fly off and start building their new home. This swarming period should only last a few hours or a day.
Somewhere in the middle of that swarm is the queen. During this time, the bees don't eat so finding a new place quickly is critical. Since there is no young or food to protect, a swarm is not as frightening as it looks - just don't threaten the queen.