You're getting a limited connection - you're connecting to the switch (the box has 4 components in it - switch and router are two), but the router isn't connecting you to the internet. It could be because of the password, the router could be set to whitelist only certain MAC addresses (the owners'), there could be no more addresses left in the DHCP server, etc. Wifi isn't some universal thing you'll find anywhere (it's actually a federal crime in the US to use someone else's wifi - even with their permission it's theft of service from the ISP), it's a connection you make to your router or to a router that the owner pays to provide public service (like Starbucks, McDonalds, etc).