If you mean a public hotspot, there are precautions you need to take, but if you follow them you will be safe.
- If the hotspot has a lock icon next to its name, and you are given a password to connect, then it is safe
- If it does not have a lock icon, but you are prompted for an ID and/or password on a web screen, do not use any password that you have used anywhere else. And if you enter an email for an ID that means your location can be tracked; best to avoid hotspots that want your email address unless being tracked doesn't bother you
- Always keep your phone up-to-date with the latest version of iOS, to assure you have the version that has addressed potential security risks
- NEVER click on anything in a website that wants to install a "profile" on your phone (if you accidentally click on one the iPhone will ask you to confirm, so don't worry if you inadvertently do so)
- NEVER get an app from anywhere other than the Apple App Store (there's an icon for it on your phone).
The rest of these guidelines apply to hotspots that do not have the lock symbol:
- It is safe to use apps from Apple's app store; they are required to use encryption when "talking" to their servers
- If you use Safari (or any other web browser) ONLY go to sites that begin "https://" and avoid sites that are just "http://" (note the missing "s")
ADDENDUM: I just saw Kappy's post. He is right that using a VPN makes you safer, but if you are cautious, as I described, a VPN not essential, but is extra security that is worth having.