Begin by buying your iPhone, of course. If you’re upgrading, sync your current iPhone to your computer before you go the store to buy your new one. This way, you’ll have a backup of your data and settings waiting for you when you return home with your new phone.
Also, be sure that you’ve got iTunes installed on your computer. The iPhone 3G requires iTunes 7.7 or higher.
When you’ve got your iPhone 3G, connect it to your computer via included USB cable.
When the screen below appears, click Continue.