Connecting to the Internet with an iPad or iPod Touch, via public wifi
When your iOS device doesn't get an IP address from the router that will route packets to web sites like www.apple.com or some of the other under the hood servers like the iCloud servers and APN (Apple Push Notification) servers it will let you know it's not connected to the internet.

In this case, it's almost always a problem with the wireless router or the internet service in the shop. Even if other people are surfing, the router could be out of new addresses and need a reboot. If no-one in the shop has access, then the causes could be lots of other things and not a temporary outage of DHCP addresses.