To sync your account:
1.Go to your iPhone or iPod Touch settings application
2.Tap Mail, Contacts, Calendars
3.Tap Add Account
4.Tap Other and then tap Add CardDAV Account
5.If you are on iOS software version 4.1, you need to enter yahoo.com as the server. If you are using an older version to iOS 4, you can enter carddav.address.yahoo.com
6.Now type in the Yahoo! ID and password you use to sign in to your Yahoo! Contacts
7.Once you click Save, your device will verify your Yahoo! ID and password
8.Next time you open up your iPhone or iPod Touch Contacts app you will see a page allowing you to see your Yahoo! Contacts sync into your device Contact list.
9.If you'd like to have the contacts you add onto your iPhone automatically sync to Yahoo!, you will need to go back into the device Settings application. Click on Mail, Contacts, Calendar. Drag the page down to the Contacts section and change the default Contacts account that you would like to save Contacts to.
Note: Some characters in the password may not work (such as '#' and ' ') when setting up CardDAV. Depending on what version of the software you are using this may or may not be the case.
If you are having problems syncing your Contacts try going to Settings, Safari, Clear Cookies . Then quit the Contacts application and restart it. If your phone supports multi-tasking, make sure you completely quit the Contacts application.