Swarm Cells
These are "peanut shape" objects that can be found protruding from the lower part of the brood nest area. Developing queen larvae transform and pupate in these special enlarged cells that are large enough to accommodate her larger size.
The young "queens to be" are fed a continuous high protein diet of Royal Jelly* from the time they hatch until their cells get capped. From hatching to cell capping takes about a week, then another week developing in the pupa stage before emerging as a virgin queen at around 16 days.
Her first task as a candidate to inherit the colony is to seek out and challenge any other freshly emerged queens to a fight to the death. If she discovers any still in the cell, she will sting through the casing and eliminate the chance of losing a battle to a stronger opponent.
Once all the other young queens are eliminated, the surviving virgin queen will start to mature and begin to feel her hormones kicking in over the next 5 to 6 days. At which time she'll do a couple of short orientation flights before going out for her Mating Flights.
This is where things can go wrong and leave the colony queenless with no way to raise another queen. They no longer have a freshly hatched egg to devote to the queen rearing process. The last eggs they had were from the old queen mother over two weeks prior. So if the new queen does not return for any reason, they are doomed.
As mentioned on the Swarm page, the success rate is about 70% for queens to make it back from mating flights. There are plenty of birds in the spring with mouths to feed and dragonflies can catch a chunky queen much easier than a regular size worker bee. Then of course there are other elements, like weather conditions, spider webs, school busses racing by and humans with farm equipment and irrigation systems and so on.
= The diet of Royal Jelly and cell size is what separates the queens from the workers, in terms of forming faster and larger in size and reproductive system development.