It's caused by a class of chemical signals, unoriginally called chemosignals, that are found in human sweat, tears and possibly other fluids. The extent to which chemosignals affect humans in day-to-day life is still under debate: It's hard to measure this kind of thing accurately, because a lot of the time the influence of chemosignals is subconscious.
"Wait, why do I keep having flashes of gay pornography?"
That's what's so weird about it -- even though the MRI showed different parts of the women's brains working depending on which sweat they smelled, in every case the subjects claimed they couldn't tell the difference. Yet, when made to guess which was which (fear sweat vs. happy sweat, horny sweat vs. normal sweat), they were able to pick correctly (at least, at a rate better than chance). So it appears that a lot of what you just "sense" about people is nothing more than picking up chemicals in their fluids.
And make no mistake, these psychic nose-messages do affect us: Sweat collected from men about to go skydiving was shown to activate the "fear" sections in brains of people exposed to it. Women exposed to male fear-sweat also rated neutral faces as more "fearful" than when they were sniffing sweat unassociated with terror.
And psychotic faces to be more "murdery."
And get this -- the military is funding research into automated emotion detection systems that use chemosignals to detect suspiciously anxious people in public places. To picture the future, imagine a robot nose sticking into a human armpit, forever.