Simple. Plug in iPhone and click the restore button. You must enter DFU mode if jailbroken.
The *key* completely reinstalling the iOS is to NOT restore from a backup.
I found the best way to do this is to download the iPSW you want to restore to...(perhaps use a tool to rebuild it with SHSH blobs you are restoring to older fIrmware) and save it to your desktop.
Enter DFU (or PWNED DFU if using a custom iPSW), open iTunes and shift+restore to the iPSW.
Once restore is done...you have reinstalled your iOS. That's all there is to it. Simple really.
You can restore from backup afterwards, but just plugging in the phone, right clicking on it, and clicking "Restore From Backup" does not completely reinstall the iOS. If it did..you would lose the jailbreak. All that option does is restore whatever settings where backed up in the backup file you used.
It is advised that one should NOT restore from a backup when you are restoring to fix a problem. Problems can often get backed up with everything else too. Tho you could always use an older backup in which you are certain did not have any problems.