Apple has designed the iPhone to work almost seamlessly with Apple computers, including the iMac desktop systems, in a unified computing environment. An iMac contains all the software you need to sync and interact with your contacts, calendars and bookmarks from your iPhone. To sync contacts from your iPhone to your iMac, you will first set up iTunes to synchronise your phone contacts with Apple's Address Book application. Every subsequent time you sync your iPhone with your iMac, your contacts will be synchronised in the process.
Launch the iTunes program on your iMac and connect your iPhone with the USB cable. All iMacs come with iTunes pre-installed.
Listen for a beep from your iPhone and then look in the left column of iTunes under the section "Devices" for the name of your iPhone. Click the name of your iPhone, and you will see a general-summary screen for the device.
Select the "Info" tab at the top of iTunes and then check the box next to the "Sync Contacts" item at the top.
Press the "Apply" button at the bottom-right of iTunes to sync your iPhone with your iMac.
Open Address Book on your iMac to verify that the contacts have been synchronised over from your iPhone. The easiest way is to click on the Spotlight icon in the upper-right corner of your screen; it looks like a magnifying glass. Type the word "address" into the field and select the top item within the "Applications" section.