"All consciousnes is one, separated only by a thin veil of the physical"
- – Jace Beleren, Vryn's planewalker
"What is a drop of rain, compared to the storm? What is a thought, compared to a mind? Our unity is full of wonder which your tiny individualism cannot even conceive."
- – The Many, System Shock 2
"HEY GUYS. ANYONE HUNGRY TODAY? BECAUSE WE SURE ARE."
- – Tyranid Hive Mind, TTS
You know how your brain is made of a bajillion on/off chemical switches? What if you had a meta-brain that was made of a bajillion brains? Congrats, you're now envisioning what is basically a hive mind. Some hive minds have a central hub 'queen', or multiple 'queens', while others have delegated thinking-drones with their own personalities (Type A). Others however have no sort of "core" units any more than you have "core" neurons (Type B). A hive mind race is depicted as either a race of individuals each in perpetual telepathic contact with all the others, or else, in the logical conclusion of the neuron analogy, the entire race is actually all a single person whose practically in multiple places at once.
Eusocial insects colonies like ants, termites, bees and wasps, are usually the textbook example of a hive mind. Ants, however do not have any dedicated thinking units, nor any command structure: their queens are just immobile baby factories. There is no single thinking body or overriding mind spread among the insects; each individual acts on its own volition, informed by its instincts and acts for the Greater Good of the colony. Said instincts, honed by evolution for social coexistence, gives each individual a predictable purpose and behavior independent of any higher thought organization. Each ant or bee is born knowing its place in the colony, and uses its own intelligence (humans have 344000 times more neurons then an ant) to perform actions that keep the whole colony alive, when said colony is reliant upon every other member of the colony also doing the same to manage resource intake, keeping the hive clean to limit sickness, protect the hive from other predators or rival colonies, and occasionally produce breeding members to make more colonies. Really creepy when you think about it too much.
With a hive mind, you can have from a dozen to a city full of faceless minions that never fail morale checks; because each individual is wholly devoted to serving the greater whole in a Type A hive mind, and because the single person is no more troubled by losing five bodies than you would be by losing five neurons in the Type B hive mind. Given this, their aforementioned connection to vermin, and the fact that the concept easily lends itself to a race of space communist(s) (even though having "core" units would make them a caste system), hive mind races are almost always the villain, being given a raging hard-on for imperialistic expansionism. Cease this instance Guardsman!
Despite this, a hive mind could logically serve several quite nonvillainous roles rather well. Depending on just how the multiple individuals/bodies actually communicate with one another, they could serve as an excellent means of instant long-distance communication, for example. But this is rare in fiction, the closest example of a 'good' hive mind are the Geth from Mass Effect, and they're a loose example given the exact nature of how their intelligence works.
In Warhammer 40k, the "Hive Mind" is the ultimate, supreme grand master awesome badass overlord of all Tyranids. It blots out all psychic signals, including the Astronomican, Astropath communications, and even the Warp. The latter is very upsetting to anyone that isn't a Tyranid (and probably Necrons, but the majority of them don't care either way).
The Hive Mind is made of literally every Tyranid creature, and the hive fleets are merely appendages of the Hive Mind. This means it is very, very, very big - fucking huge, actually: its capacity for violence and reach is far beyond that of Khorne's while denying him any actual bloodlust, renders Tzeentch's plans impotent (individual Tyranids have no minds to outsmart), the immortality offered as part of a greater whole is beyond the shambling eternity of Nurgle, and no temptation nor depravity of Slaanesh's can sway a Tyranid away from the Hive Mind any more than you or I could cajole a liver cell into acting like a kidney cell. The Emperor himself cannot penetrate the will of an entire spacefaring species acting as one.
There are only two recorded cases of the Hive Mind being in any way foiled: Varro Tigurius (in a story written by Matt Ward, natch), and one case when a besieged Craftworld managed to get a distress call out past the Hive Mind to the Eldar pirate prince Yriel (this fleshing out of lore was also written by Matt Ward, but here it was a concentrated effort by an entire planet of highly psychic aliens, and more than one of their best died from the strain).
When facing a Tyranid in battle it is not the individual before you that you fight, but the Hive Mind as a whole operating through the body of said critter. Now this actually is as bad as it sounds, but luckily for the other races of the galaxy the Hive Mind is not flawless. Its largest weakness is that it is pretty much a gestalt, its power and aptitude to influence events growing with the amount of individual bodies in a given place at a given time. There are exceptions to this rule, but generally speaking a single isolated Tyranid organism isn't any more dangerous then, say, a hippo or a wolf. Oh ya it can fuck you up but without higher level thought it can't make a plan other then stampede, gore you and then stomp on the paste. It can't think beyond basic predator hunting tactics and forget about strategic thought. Even a large mass of Hormagaunts, while dangerous, has no ability to form tactics or act with forethought beyond that you would expect from a wolf pack, a wolf pack with swords instead of forelimbs mind you, but wolf pack none the less. But when expressed through the synapse creatures designed to channel it, the Hive Mind can express its full power through its otherwise stupid minions and the Tyranids can become nigh-on unstoppable. Even when present in overwhelming numbers, it is neither omniscient nor omnipotent and the Hive Mind can be tricked, outsmarted or even beaten into submission by sheer resilience and/or firepower. This said: while the Hive Mind does make mistakes and can be outsmarted, you can fool it with the same trick only once; losses are anticipated and are useful either to cull the genepool, as fuel expended to ensure victory and/or simply to gather knowledge about a given lifeform to better adapt against it for the next time a Hive Fleet encounters said lifeform. The Tyranid Codex reminds us that even defeats anywhere may serve to ensure a victory somewhere else -- pray that you are at "anywhere" and not "somewhere else."
If you want to know its full brilliance: it once outwitted the Ultramarines. There you go.