How to do a factory restore on my iphone 4s?

I locked myself out and the lock button doesn't work btw

Added (1). Thank you sir

Plug into your computer, you will need iTunes, in iTunes select your iPhone 4S (Patrick's iPhone 4S.) On that screen you should see a picture of your phone. Click the button that says restore iphone.

  • Will i lose my iphone contacts if i restore to factory settings? I have to restore to factory settings because of a really annoying problem related to downloading apps, will i lose my contacts if i restore to factory settings?
  • My iphone wants to restore to factory settings? Question is should i do it? it states it will erase all data and update so i'm not sure if i want to risk it incase it worsens the situation. i've updated itunes and tried again with no luck. Its annoying as i can't sync any cds onto it and it can't update… Is it worth the risk? Or should i just leave it and keep it as it is as i have no other problems with the phone.
  • My iPhone is not factory unlocked. Can I still restore it? I have about 3.59 GB of the other and I've deleted history and cookies from Safari, deleted messages, apps, deleted my email account from the phone etc. But it's still the same. The only way I can think of getting rid of that massive other is to restore but I'm afraid that my phone will not be unlocked anymore. Can I still restore it? Are there other things that I can do to get rid of it without restoring?
  • IPhone Spyware: Restored from backup. To late to restore to factory settings? Believe an Ex jailbroke and put spyware on my iPhone. Connected to my computer and iTunes but restore from a backup not to factory defaults. Concern is that if I do so now, is my computer and the restore already corrupted? Does iCloud make a difference?