I refer, of course, to that prototypical hive: that of bees. It's long been noted that many types of insects -- individually far from intelligent -- exhibit complex group behaviors and build complex structures. Complexity within groups emerges from the seemingly simple behavior of the individual units.
It's not only insects. Flocks, for example, exhibit behaviors that result from the unsophisticated reflexes of individual birds. ("Bird brain" isn't an insult for nothing, nor "silly goose.")
The overall phenomenon is called emergence. If you are of a computer-oriented frame of mind, you may prefer the term cellular automata. Either way, the fascinating thing is complexity arising out of simplicity and large numbers. One theory of human intelligence is that it emerges from the 100 billion neurons (and 100s of trillions of synapses) in each of our brains.
The natural emergence of complexity -- and perhaps, intelligence -- from large numbers of simple units is so attractive it may be the leading fictional premise for the emergence of an artificial intelligence. Certainly I've introduced AIs that way (in only some of my AI-centric stories.)
The SFnal (and sociological) question becomes: if sophistication emerges from collectives of simple creatures, what might arise from collectives of intelligent creatures?
We have plenty of good SF to choose from. To name a few personal favorites:
- the dog/wolf pack-like Tines of A Fire Upon the Deep (Vernor Vinge)
- the multi-species Borg of the Star Trek franchise.
- the hive humans of Hellstrom's Hive (Frank Herbert).
- the group ensembles of the starfish-like Gw'oth (with the individual Gw'o in turn descended from a colony of carnivorous worms) of Fleet of Worlds (Larry Niven and Edward M. Lerner).