Often used for a foreigner of European ancestry; can sound old-fashioned or literary in modern Japanese. 外国人 is the neutral modern term.
different person; another person
Used to emphasize that someone is a different individual, not the same person. Often appears in contrastive contexts.
He seems like a completely different person from before.
In the Meiji era, many foreigners lived in Yokohama.
異人 (also read いじん) means a foreigner or a different person, while 偉人 means a great, historically important figure; the two are unrelated words that happen to share a reading.
Compound of 異 (i, 'different') + 人 (jin, 'person'). The 'foreigner' sense is an extension of 'different person', historically used for Westerners in the late Edo and Meiji periods.