The most obvious answer might be to have having two or more wifi cards installed in your computer to enable the connections. If you dont have the hardware there is an alternative.
Virtual Wifi from Microsoft research labs is your answer. Virtual Wifi enables you to connect to multiple wifi networks using a single WLAN card.
You might also be interested in looking at our post about setting up wireless networks without a router.