1. Do you have a computer that is connected to the internet? If so, download the latest iTunes app for it, connect your iPhone 4S to your computer via USB, and when iTunes detects it, select to update to the latest iOS version, if applicable, or choose to restore your device and set it up as new.
2. You can also try doing one or both of the following:
A. Go to Settings - General - Reset and then select "Reset Network Settings".
B. Go to Settings - General - Reset and then select "Reset All Settings".
Hopefully, one of the above will give you Wi-Fi access. Oh, and just to be sure we're covering all of the bases, go to Settings - Wi-Fi. If you see "off", tap on it and then tap on the button to turn it on.