What items will be kept and lost if I got a new iPhone?

I have an iPhone 3G and am considering switching to an iPhone 5. Will all my history and files (texts, phone calls, photos, music, notes, etc.) be accessible on the new phone?

It depends on what iOS your 3GS is running on. Here are your following options:

If you iPhone 3G is on iOS 5:

You would need to set up an iCloud account so photos, notes, and contacts can be backed up. You can access these files simply by logging into iCloud on your new iPhone 5. Please note music can't be transferred over so you would need to have the music on your computer and you can sync it through iTunes.

If you have iOS 4.x.x (x is just any firmware version in iOS 4) or below:

You would need to back up everything to your computer via iTunes. Once you finish backing up your iPhone, you can sync your new iPhone 5. Please note when you plug in your iPhone 5, iTunes will prompt you with the message to continue as a new iPhone or continue as existing. (my wording is a bit off on the message). You MUST select the option of an existing iPhone, that way it will ask you to restore from your backup.

Please note the second method is valid for all iOS firmware. Some people just prefer iCloud while others prefer using iTunes for everything. In the long run, iCloud is more convenient because you won't need to have your computer to get backup data.

Last note is history of text messages are not available to my knowledge. Hope this helps.