You can create a backup of your iPhone's settings and content on a computer by synchronising it with the iTunes multimedia management software from Apple. iTunes also allows you to purchase and download new content onto the computer from the iTunes online store and then to transfer it to the iPhone. For your computer and iPhone to sync, they must both be signed into the same iTunes account. Before you can sync the iPhone to a new computer, it must be signed out of its current iTunes account and into the same one as the new computer.
Launch the "Settings" application on the iPhone by tapping its icon on the home page.
Select the "Store" option. Highlight the current Apple ID and press the "Sign Out" button. This signs the iPhone out of its current iTunes account.
Enter the username and password of the iTunes account currently being used by the new computer and press the "Sign In" button. To check the details of the account, launch iTunes on the computer; click the "Store" option in the menu at the top of the window and select "View My Account."
Connect the iPhone to the new computer using its USB cable. iTunes automatically detects that a new iPhone has been connected and asks if you want to restore it as a previously synced iPhone or set it up as a new one.
Select your set-up preference by clicking the relevant button in the pop-up box. The iPhone syncs with the new computer, and any content linked to its previous iTunes account is removed and replaced with content associated with the new computer's account.
You can return the iPhone to its previous state by signing back into the old iTunes account and syncing with the previous computer. Only licensed or protected content -- games, applications, music and videos -- is removed from the iPhone. Any content owned by you that isn't copyrighted remains on the iPhone when it's synced to the new computer.
You are unable to purchase or download any new content to the iPhone until it's signed back into an iTunes account.