You have to have a compatible wireless router. The Nintendo DS Wi-Fi USB Connector works with it, as does a generic third-party brand that works with the PSP as well.
You also need to have it within thirty feet of the router or you'll lose connection speed.