I know that it is recommended that I backup my data, but if I upgrade to an iPhone 4S to iOS 6, does everything in my iPhone get deleted? Or does it keep original data, except when some errors occur?
If everythings runs smoothly (as is usually the case) you won't lose anything, nothing will get deleted.
But even the best engineered update process can fail. So it is best practice to back up an iPhone on a regular basis and specially before updating (like with any other device/computer, for that matter). Why? Because sometimes things go wrong. And a backup is like an insurance policy on your data.
Luckily Apple makes it easy: iTunes always backs up your iPhone before updating. If you prefer an over-the-air update, you can back up you iPhone to iCloud.
(I prefer backing up to iCloud, a friend of mine overwrote the iTunes backup after a failed update and lost all data.)
The problem is you can't go back and make a backup later if things fail. The OS first checks for enough space to unpack the new OS, then sets the device to reboot and migrate all the settings you made and update the new OS to match as closely how the old was configured by you. It then deletes all the old "system". Unless Apple tested a phone with exactly the same combination of settings as you have chosen, there is a small chance their script will have an error in your input conditions.
If you are OK erasing the phone and then installing the clean OS - then you don't need a backup. If you are not OK losing all your data, then you do need a backup. The same holds true if you are going to let your phone sit on a table overnight. You don't need a new OS install for things to go wrong - sometimes computers fail and go wrong even though the designer didn't program that into the code.