1. Update to 6.0.1 in iTunes. This will remove the jailbreak and your settings won't be affected. Do this if you aren't experiencing problems. I've done it this way for years.
2. If you are experiencing any problems with the phone, you may want to do a regular restore instead of simply updating. You can apply your backup if you want. If you continue to have problems, restore to factory settings.
3. If you want to remove all traces of the jailbreak, you can do a DFU restore. This probably isn't necessary, though. The only time I would do this was if I continued to experience problems that survived a restore to factory settings, if a regular restore failed, or if I was taking it into Apple for a warranty-covered replacement.
To return your device to stock simply plug your phone into your computer, open iTunes, and click on update. This will update your device to the current firmware, iOS 6.0.1, and the jailbreak and Cydia will be gone.
If you wish to return to stock 5.1.1 it gets more complicated.
Edit: Europa beat me to the reply and gave more thorough information.