Your smartphone or tablet may be set to automatically connect to any available Wi-Fi hotspot, a setting that can seriously endanger your privacy. Not only will this allow your device to connect to public networks without your express permission, you may also be automatically connecting to malicious networks set up specifically to steal your information.
Most modern smartphones have this option disabled by default, but this isn't always the case, and it's a setting you should always double-check. First, open the Wi-Fi section of your phone's settings app. If you don't see an option to disable auto-connecting, you're already safe. Otherwise, turn this setting off.