Hives produce queen cells in two locations and each means something different:
A hive that senses a failing queen, or a hive that is suddenly queenless (killed by careless beekeer ? ) will sense an emergency and will have to produce a queen from a normal egg. In other words, they did not plan for this situation. These queen cells are on the side of the frames. Usually, 2 to 6 cells are produced.
On the bottom of frames in the upper brood box, you will see "queen cups." Check them if you suspect the hive is preparing to swarm. (Signs of swarming are: many bees clustered in front of the entrances, a general listlessness in flights, and of course, most importantly a hive that has the brood area "plugged out" with honey.) When a hive prepares to swarm, they will raise queen cells in these cups. Are the cups "wet" or "dry?" Once wet, they are raising queens in order to swarm. They usually raise a dozen or so.
If you catch them early, provide plenty of room for the brood cluster: spread the brood cluster out over 3 boxes or so and fill in with frames of foundation.
If the cells are sealed with many "finger cells" hanging from the bottom of the frames, there is probably nothing you can do to prevent swarming.
If you open a hive and notice a dramatic weakening in the number of bees, suspect swarming. Look for the hatched queen cells on the bottom of the frame.
Swarm season is just about over. Probably 2-3 weeks to go.