Nintendo Wi-Fi connections were available at official Nintendo Wi-Fi Zones, which were hosted at participating businesses and public locations. You could also connect from home through a compatible wireless router.
It's worth noting that the original Nintendo Wi-Fi Connection service was shut down years ago, so today those hotspots and the service itself are no longer active.