You can backup everything on the phone (texts, camera roll, apps, settings, etc) by right clicking or control clicking on the phone in iTunes and choosing make backup. That backup is normally created whenever you plug in to do a sync. The backup is stored in ~/Library/Application Support/MobileSync/Backup/ in a folder with a long string of numbers and letters.
If there are multiple folders in there that is because iPods and iPads each also create their own folders.
What does not get backed up is anything you sync to the phone (Music, Video, etc) although it will resync all of your same selections onto the new phone. If you are upgrading to a new phone your passwords will also not be included in the backup unless you have an encrypted backup.
If you have time machine on then you are backing up that folder. If you don't have a regular backup of your computer (you should!) then you can duplicate the above mentioned folder onto your desktop after you do a sync to be sure you have it should the upgrade go awry. The thing about the iPhone backups is that it only keeps one (the most recent) so it is best paired with Time Machine.
Basically just make sure you create that one last backup of the old phone, make sure you have that backup on your computer, and then plug in the new phone and you will be presented with the option to set it up with the backup from your old phone.
Edit: I wrote this before you added the Windows tag. Most of what I wrote still applies, but the path for the backup is different in Windows, and of course Time Machine is Mac only.