Anyone shouts, "give him/her air, everybody" when someone faints. In this case, what does it mean exactly?
Shouting "give him/her air!" when someone faints or collapses, or maybe more commonly, "give him/her some air!" is a clichéd utterance. It means "stop crowding closely around, step back". There is no implication or suggestion that the person of concern is in danger of asphyxiation, at least not because of the bystanders' proximity.
It's simply a way to tell the onlookers to give the person some extra room and space, because too many people have crowded around the person who just fainted.
Sometimes the extra space around a person is called breathing room. According to TFD:
breathing room (also breathing space)
sufficient space to fit or accomplish something: no breathing room on the crowded airplane
sufficient room for easy breathing or movement: moved to the country to find breathing room
It's established, figurative, idiomatic language. When someone has fainted, someone may borrow this expression to ask people to back away, as in, "Give him some breathing room!"
Sometimes the wording will be altered and someone might say, "Give him room to breathe!" or even, "Give him some air, everyone. Please move back."