You can use iTunes to easily sync your contacts from your computer, Google or Yahoo.
The steps are the same on a Mac or PC. As you can see from the Mac screenshot below, when you select Google or Yahoo you will be prompted for your account information.
Once iCloud is released with iOS 5 you will be able to sync your contacts, mail, calendars, reminders, bookmarks,notes and photos to iCloud then to all your iOS devices and to your Mac or PC.
iOS 5 is expected to be released this fall.
Add an email address and send a message with a tap. Set a reminder that’s saved to your calendar or add notes, important dates, a Twitter username, birthday and much more.
The contact information you add or edit will be synced back to your computer the next time you sync with iTunes. This will keep your contact information consistent with all of your iOS devices and your computer.
Note: If you want to create contact groups (family, work, etc.) you will need to do so on your computer, then the groups can be synced to your iDevice.
You can also create groups with Google or Yahoo if you are using one of them to import your contacts.