It is a common phrase used in Spanish to express surprise or disbelief when someone is identified or something is revealed.
For example:
* "¡Pero quien es ese hombre!" - "But who is that man!"
* "Pero quien te dijo eso?" - "But who told you that?"
It essentially translates to "But, wait a minute, who is this?" or "But who would do/say that?"