In order to understand how anthropology can help to prevent the spread of HIV, let us think about what anthropology is. It can be defined as the study of human cultures. In other words, it examines cultures and societies and tries to understand what sorts of relationships, institutions, and social practices exist within those societies.
Now, let us think about the spread of HIV. HIV is typically spread through a combination of sex and intravenous drug use. Sex, in particular, is very much a subject of anthropology. Therefore, anthropology can be used to understand the sexual dynamics of a society that tend to allow HIV to spread. Governments or other organizations can then try to craft programs that would promote safer sex within the society.
Anthropology is useful in this sort of a situation because it can help to understand why people engage in sexual behaviors that are likely to transmit HIV. It can look at cultural causes such as the supremacy of men over women in some African societies or the societal rejection of homosexuality in the US, particularly in past decades. Once anthropologists have helped produce an explanation for why people in that society engage in risky sex, it becomes more possible to craft effective ways to combat those tendencies.