Most likekly you are out of the range of the WiFi hotpost or simply it's just too slow.
1. Check the strength of the WiFi signal on your mobile or table: make sure that you see at least two bars on the WiFi indicator on your screen.
2. Try getting closer to the WiFi hotspot to improve the WiFi signal reception.
3. It´s also possible, specially at public WiFi access points, that there are people connected at the same time as you. Wait a few moments, try again and if you still can't connect, find another WiFi hotspot nearby in the map that may be less busy.