Xenophobia is the fear of strangers or foreigners. It might be fear/hatred directed by one subset of a population against another subset (I am a Northern Martian, and I hate Southern Martians because they are violent and stupid), or it could be a cultural fear/hatred aimed at another culture and its influences (we Earthlings hate Glespian music and fashion).
Xenophobia can be a result of upbringing, negative experiences, cultural norms or peer pressure/fear tactics. Some have argued that we have an instinctual fear of anything or anyone markedly different from us, especially in speech or appearance. In the distant past, this may have helped us to avoid conflict with other groups perceived as threatening in some manner.
So what's the different between racism and xenophobia?
The two are distinct but can overlap. Racism usually entails fear/hatred based on physical differences and/or ethnicity, such as skin color, hair type, and facial features. Xenophobia is based on "foreignness". For example, a member of a certain race may emigrate for a period of time; when he returns, having picked up different speech patterns or habits, he may be targeted by a member of his own race for being "different". It can also be a matter of regional accents, customs, religion and/or perceived social class. ("Okies" and "Carpetbaggers" immediately come to mind as examples of xenophobic labels in US history.)
Xenophobia pops up in crime fiction and science fiction quite a bit. But it can be useful in any genre, either to give us insight into characters and their behavior, or to plunge the reader more deeply into a particular setting. It can form a subplot or help to create tension. A female investigator may walk alone into a bar/tavern in a country where that is considered socially unacceptable. A student may return from a university overseas and be ostracized by old friends because he has acquired different clothing or an accent. And what if your character decides to date someone from a different country or culture? How does that play out among family and friends?
Are your characters xenophobic in any respect? Are they worldly and well-traveled, or have they been sheltered and never exposed to different cultures? What about members of their family? How would your character react to a situation where someone was being taunted or discriminated against? Have you ever been in a situation where you felt uncomfortable or threatened because you were considered a "foreigner"?
Now, just for fun take the...
OKCupid Xenophobia Test