Xenophobic person is aware of the fear, and therefore has to genuinely think or believe at some level that the target is in fact a foreigner. This arguably separates xenophobia from racism and ordinary prejudice in that someone of a different race does not necessarily have to be of a different nationality. In various contexts, the terms "xenophobia" and "racism" seem to be used interchangeably, though they can have wholly different meanings (xenophobia can be based on various aspects, racism being based solely on race and ancestry).
For xenophobia there are two main objects of the phobia. The first is a population group present within a society that is not considered part of that society. Often they are recent immigrants, but xenophobia may be directed against a group which has been present for centuries. This form of xenophobia can elicit or facilitate hostile and violent reactions, such as mass expulsion of immigrants, or in the worst case, genocide.
The second form of xenophobia is primarily cultural, and the objects of the phobia are cultural elements which are considered alien. All cultures are subject to external influences, but cultural xenophobia is often narrowly directed, for instance at foreign loan words in a national language. It rarely leads to aggression against individual persons, but can result in political campaigns for cultural or linguistic purification. Isolationism, a general aversion of foreign affairs, is not accurately described as xenophobia