In a beehive, everything revolves around the queen bee. She’s the most vital member of the entire colony because she’s the only fertile female. She’s not only the queen but the mother of all the bees.

When a Queen Bee Dies
When a queen bee dies or is murdered – whether intentionally by members of the hive or an external force – the rest of the hive’s population must find a new queen. This is vital to restore order and normalcy to the colony, survive the foraging winter and ensure consistent population growth.

The method in which a new queen is chosen revolves around the cells in the hive:
Superseding Cells
The queen produces various pheromones that inhibit certain actions in the worker bee caste. Failure to distribute these pheromones or lay the appropriate amount of eggs may cause worker bees to supersede her — to ensure the survival and productivity of the hive.

When they decide they want to replace her, the worker bees will build one or several replacement queen cells. The aging or less potent queen bee will then lay an egg in each queen cell. This is the last task the aging and impotent queen fulfills before the worker bees kill her.
Emergency Cells
If the queen dies naturally or is killed, the worker bees reconstruct some worker cells into queen cells. This is typically on the comb area containing the brood and larvae. The larvae are then fed with special royal jelly throughout the entire larval period. The worker bees continue to condition these larvae to become queens.

This process is urgent and unplanned. Without a queen bee, the colony cannot function properly, as no pheromones are being emitted. The colony erupts in chaos and needs a new queen as soon as possible. Again, these pheromones control the actions of all the workers in the hives.
Swarming Cells
If the swarming impulse is triggered, several queen cells are created along the sides of the comb or at the base of the hive. The queen continues to lay eggs at intervals in these cells over several days. The old queen leaves the colony with half of her workers to establish a new colony elsewhere.

This usually happens when the beehive becomes overcrowded and too constrained. The old queen willingly leaves and allows a new queen to be born and replace her. In this case, though, the swarming occurs after the loss of a queen bee — whether it be to disease or old age. Swarming can also happen if the queen bee is aging, unable to lay enough eggs and when the population begins to decline.