This is a method of studying cultures. I always thought this was anthropology, but it turns out that this is a subdivision. It’s also a little vague.
While, traditionally, ethnography has relied on the physical presence of the researcher in a setting, there is research using the label that has relied on interviews or documents, sometimes to investigate events in the past such as the NASA Challenger disaster. There is also a considerable amount of ‘virtual’ or online ethnography, sometimes labeled netnography or cyber-ethnography.
So, someone doing anthropological research would perform an ethnography by embedding with the subjects.
From an article helpfully entitled What Is the Difference between Anthropology and Ethnography?:
The short answer to the question is that anthropology is a discipline and ethnography is a methodology. Anthropology refers to the study of human cultures and humanity in general, and ethnography is a methodological approach to learning about a culture, setting, group, or other context by observing it yourself and/or piecing together the experiences of those there.
The etymology is interesting. The “ethn” makes me think of “ethic,” which means I thought it had something to do with race. However, in Greek, “ethnos” means “people” and “graph” means “I write.” So ethnography literally means the writing or studying of people.