Not a bad question. How does a creature with no brain—but with long, venomous tentacles—manage to travel in dense packs without things getting really socially awkward? I took Kate's query to Southern Fried Scientist, a science blogger who doubles as a graduate student studying deep-sea biology.
Jellyfish can and do sting other jellyfish, he says, but really only when they're hunting jellies of another species. They don't sting the other members of their same-species swarm. Neither (luckily) do they zap themselves. It works because jellyfish tentacles aren't inherently poisonous. Rather, it's the nematocytes—special cells that line the tentacles. When touched, nematocytes fire off microscopic quills that lodge in a victim and pump in the venom. But this weapon comes with a built-in safety switch.
"Jellyfish have chemoreceptors that turn the nematocyte on or off," Southern Fried Scientist says. If the receptors pick up the chemical signature of the jellyfish's own species, nothing happens. Everything else is assumed to be potential prey (or, at least, a potential threat) and, thus, worth firing upon.