How to reset my iPhone 5s to factory settings?

I bought an iPhone 5s from a friend and used it as is. I'm now trying to sell the iPhone and I need to delete the content on the phone because I previously used it for work purposes and have private and confidential passwords etc on it. I have already deleted the files, but want the content completely deleted and unrecoverable. On a side note, I have recently been introduced to the functions of iCloud and was worried that these files may have been saved to the previous owners iCloud account. However, when I went to setting>iCloud, I was asked to sign in and there seemed to be no existing signed in account.

My questions are:
1. Is an Apple ID the same as iCloud accounts?
2. If there was no existing iCloud account signed into the iPhone for the duration of the time that I owned it, does this mean that the content is not floating around somewhere in the previous owners iCloud account?
3. Will restoring the iPhone to factory settings ensure that the content in unretrievable? Presuming that the content is not on an iCloud account.
4. If I restore the iPhone to factory settings while there's no existing iCloud signed in, does this mean I won't need to provide usernames and passwords to the iCloud account while setting up the iPhone? I'm not actually sure if the previous owner had an iCloud account or not, however it is not signed in to one.
5. How do I restore an iPhone to factory settings? I don't have an iTunes account, however I do have a macbook

Thank you so much in advance for your time and patience

  • Will the MAC address of my iPhone reset if I reset my iPhone to its factory settings over iTunes? I have jailbroken my device and used terminal to change my MAC address so that I could connect to school's Wi-Fi. But when I wanted to change it to its initial number, I typed in a wrong value and it just messed up my Wi-Fi, I can't connect to Wi-Fi anymore. Wonder if resetting to factory settings would help…
  • Why won't my iphone 5 reset to factory settings? I held the power and home button until the apple logo came up, then i released the power button and kept holding the home button. But as i kept holding the home button the apple logo stayed on the screen and the phones lockscreen popped up… can anyone tell me what i'm doing wrong? @T-Bone i can't go into settings… I forgot the passowrd
  • Why won't my iphone 5 reset to factory settings? - 1 My iPhone is jail broken and I tried to sync it with my laptop and it kept coming up USB not recognised. So I went to the settings on the phone and tried to reset it through there so now all its doing is spinning like the phone is turning off! Anyone got any ideas how to fix this?
  • What will happen if I reset my iPhone to factory settings? And how do I do it? I just got iOS7 but I have to say, I'm very disappointed with the outcome. If I reset it to "factory settings" will it go back. Also if I do that will it delete everything on my iPhone. Actually, scratch that.iOS7 already deleted EVERYTHING. I very much dislike this. How do I go back?