If you do not have 3G / 4G service because you are in a remote area, then yes you can connect to a WiFi network to access the internet. That is assuming WiFi network is open to the general public or if you are at someone's home that person grants you access to his/her network.
Your phone must be on if you want to surf the net. Kinda hard to see anything on the screen if the phone is turned off. Actually, it's kinda hard to use a phone if it is off.