Metagenomics is the study of a collection of genetic material (genomes) from a mixed community of organisms. Metagenomics usually refers to the study of microbial communities.
"Metagenomics" is the two words "meta" and "genomics". So genomics is obtaining the DNA sequence, but meta implies that we're doing it of many organisms together. And metagenomics is usually used when we are studying microbial communities where we can't separate one microbe from another. Like there may be two bacteria that grow together, and so when you take the DNA sequence, you're getting the DNA sequence of two bacteria together. Now, as an example of this, you can imagine that I could go in and take the DNA sequence of a person who lives in New York City. But if I were to come in and take the DNA from everyone who lives in New York City and sequence it together, that would be the equivalent of what we're doing when were sequencing the DNA of all of the bacteria that live in one place on your skin or your intestine together. So we're not just looking at one organism, we're looking at the DNA sequence of all of the organisms together. Because we could imagine sequencing the DNA of an individual in New York, but imagine if our technology was limited and we couldn't separate these people in New York. If we need to take the DNA sequence of every person in New York together, and then later we try to figure out which DNA belonged to which person, that's often what we are doing when we're studying bacterial and fungal communities together.