There are a few options, you can sync them with USB, Wi-Fi or iCloud.
To sync them via USB, just connect the iPhone to the Mac, open iTunes, click the Info tab across the top of the screen, scroll down to Contacts and choose to sync contacts.
For more info on USB syncing and all of the other options, take a look at this Apple doc -> iOS: How to transfer or sync content to your computer
To sync contacts with your computer, choose "Sync Contacts with" within iTunes for Windows, or "Sync Address Book Contacts" on your Mac.
You can sync your contacts with:
- Microsoft Outlook 2003, Microsoft Outlook 2007, Microsoft Outlook 2010 (Windows XP, Windows Vista, or Windows 7)
- Windows Address Book (Windows XP)
- Windows Contacts (Windows Vista / Windows 7)
- Address Book (Mac OS X)
- Microsoft Entourage 2004, Microsoft Entourage 2008, or Microsoft Outlook 2011 for Mac
Note: If using Microsoft Entourage, use Microsoft Entourage 2008 12.1.2 or later if syncing with Mac OS X v10.6 or later. If you would like to sync data on your Mac with Entourage, enable syncing between Entourage and Address Book.
- When syncing contacts, you can choose to sync all of your contacts or only selected groups. The option to sync selected items may not show up until after the first sync.
- You can select a group of contacts to which all new contacts created on your iOS device will be added.
- Additional options for syncing include syncing your contacts with Yahoo or Gmail/Google Mail. You will need to configure it with the user name and password for your Yahoo or Google account.