Yeah that's why I've had a great interest in finding out how exactly it works. And a week ago, I think I figured it out. StreetPass uses something called Wifi-Direct. I think Maryjane brought it up once, but basically it's a way to connect and exchange data without the need for an access point or the internet. It's like Bluetooth on crack. It can connect to 8 different devices at once as well.
As of right now there are only a handful of phones that are Wifi-Direct Certified (all of them Android), but the greatest thing about Wifi-Direct is that all you need is one device to be certified for it to work. So I wanted to exchange info with someone who had an older phone but still had a regular Wifi card, we could still connect.
EDIT: The bad thing about it though is that it still takes time to connect. The way Nintendo gets around this is through proprietary software. They programmed the 3DS to search out other devices by sending out a tag. When another 3DS is in range, those tags circumvent the security process and immediately connect. Once connected, they share information.
I believe someone could right an app to do the same thing, but the app would have to be on all the time. Thanks to multi-tasking, that shouldn't be too much of a problem though.
But to immediately trade information, that time it takes to connect makes it unlikely to compete with NFC when transferring data up close.