a stranger or foreigner: a person who is outside the community, family, or homeland where they find themselves
In the ancient Mediterranean world a stranger was a person in a precarious spot: away from home, without the protection of family or local ties, and dependent on the kindness of others. The New Testament uses this word for that whole range of not-belonging, from the traveler who needs a bed for the night to the foreigner living in someone else's city.
The senses shade into one another. Sometimes the stranger is the guest who must be welcomed, as when Jesus says, "I was a stranger and you took me in." Sometimes it is simply an outsider to a people or place, like the resident foreigners in Athens or those with no family plot for burial. Sometimes it becomes the way believers describe themselves: strangers and pilgrims on the earth, at home somewhere else. And paired with an object it can mean cut off from something one should share in, as when Gentiles are called strangers to the covenants of promise.
Two nearby Greek words fill out the picture. A πάροικος is a resident foreigner with a recognized but limited standing, and a παρεπίδημος is a temporary resident just passing through. This word is the broadest of the three: the outsider as such, whoever and wherever they are.