Sand is not as passive as you might think. Down on the ocean floor, it’s filtering seawater and, thanks to a teeming set of microbes living on it, busily processing nutrients from the constant rain of sediment drifting downward. Microbiologists have studied the tiny inhabitants of sand by analyzing bulk DNA extracted from scoops of ocean floor, but while this can give you a general list of the bugs there, it doesn’t explain how they live with each other—which ones are neighbors, which ones are competitors, which grow together, what they are up to.

To start to get at that question, microbiologists recently used DNA to identify the bacteria living on 17 individual grains of sand from the seafloor near the German resort island of Helgoland and painstakingly examined hundreds of other grains with microscopes to see the creatures’ living arrangements. The results, which were published last month in The ISME Journal, provide a detailed picture of the ecology of each grain of sand, revealing the cities, villages, and hinterlands of these miniature worlds.

One notable observation is that bacteria don’t cover sand grains evenly. They are gathered together in the pockmarks and protected ravines of the surface, avoiding the exposed, open plains. What’s more, they tend to grow side by side, rather than on top of each other, arranged more like a tidy village than a series of high-rises. This may be a result of the constant swishing of water through the sand keeping layers from building up, says David Probandt, a microbiologist at the Max Planck Institute for Marine Microbiology who helped lead the work.

But the most interesting finding, to the scientists, is that the microbes on each grain of sand are surprisingly diverse. Probandt and his team had thought the bugs might grow in dense colonies of their own species, and that just a few types would take over a sand grain. While it’s true that some kinds do seem more prominent on some grains than others, none are that dominant. Instead, thousands of microbiological inhabitants of both common and strange varieties lace each individual piece of sand.

The next step for researchers is to see what the bacteria are making and doing down there. The answer is more than a matter of curiosity: The oceans are the planet’s largest carbon sink, absorbing incredible amounts of carbon dioxide every year. Major contributors to this process are annual phytoplankton blooms along the coasts. They thrive and photosynthesize for a while, then die, and their bodies are consumed by free-floating bacteria and other sea creatures, thus fixing their carbon. While it’s generally well understood how this happens before the remains hit the ocean floor, it isn’t at all clear how the organisms down there do their part. Understanding the enzymes they make and how their metabolisms work as they digest the dead phytoplankton will help open that black box, says Probandt.

It might even reveal some unlooked-for relationships between the ocean-floor microbes. Already the researchers can tell that there are some groups that digest more complex compounds, and others that work on smaller, simpler substances. Could the second group be feeding on the leftovers of the first? It’s possible, although with seawater filtering through the sand constantly, some groups may be leaving food for others that are far away on the sea floor, rather than for their immediate neighbors. The dynamics of these communities are still quite mysterious—like so much of what happens in the waters that cover most of the planet.

We want to hear what you think about this article. Submit a letter to the editor or write to letters@theatlantic.com.

Veronique Greenwood’s work has appeared in The New York Times Magazine, National Geographic, Aeon, Pacific Standard, and many others.