When I see another foreigner, my mouth drops open, I point, stare and giggle and then yell HELOOOOOOOOOO!
Actually, when I see another foreigner at my school I almost always try to talk to them. I mean, I live in a small place and yeah, kinda feel like it's "mine" and I know all the foreigners so I always try to be friendly, see what their story is and if I can help them. I've met a few interesting people that way.
But if I'm somewhere like Hangzhou or a bigger place, then I just do the smile and nod thing. i mean, that's what I do at home when I pass someone on the street, so why not here?