A foreigner is basically someone who is in a land that is not his own or is a person who comes into a community or group from outside of it.
אדם זר הוא בעיקרו של דבר אדם בן ארץ אחרת המתגורר בארץ לא לו.