When you arrive at the hotel, restaurant, whatever, launch the Settings app and look at the Wi-Fi tab. If there's a network that appears to match the establishment and it has no lock icon, just select it and you're in. You may have to agree to some terms. If there's a lock icon, ask if the password is available to customers. Sometimes it's for internal use only, such as point of sale terminals, but most hotels, motels, restaurants, and coffee shops have free customer wifi these days. Also many gas stations, highway rest stops, and tourist info centers.
Public wifi is safe as long as you don't transmit any sensitive personal information. Don't log onto any websites that require typing a password, don't do any banking or other financial business, don't type your address or phone number into a browser or email message. If your browser transmits a previously-stored password via an SSL-encrypted connection, there shouldn't be any security issue. Don't worry about reading email or catching up on news or weather, or uploading vacation shots to YouTube or Flickr from on the road.
This post handcrafted from 100 percent post-consumer recycled electrons.