Metagenomics studies begin by extracting DNA from all the microbes living in a particular environmental sample; there could be thousands or even millions of organisms in one sample. The extracted genetic material consists of millions of random fragments of DNA that can be cloned into a form capable of being maintained in laboratory bacteria. These bacteria are used to create a "library" that includes the genomes of all the microbes found in a habitat, the natural environment of the organisms. Although the genomes are fragmented, new DNA sequencing technology and more powerful computers are allowing scientists to begin making sense of these metagenomic jigsaw puzzles. They can examine gene sequences from thousands of previously unknown microorganisms, or induce the bacteria to express proteins that are screened for capabilities such as vitamin production or antibiotic resistance.
There is some bizarre stuff in there but hey that is OK. This is linking to a story in Science Daily about metagenomics which in itself is based on a National Academy Report on the field. The NAS report is definitely worth looking at.
The people who ran the committee are a who's who of the field including the chairs, Jo Handelsman (who coined the term metagenomics) and Jim Tiedje who is one of the grand gurus of environmental microbiology.