For the newest version of Yahoo, the procedure is different as compared to Yahoo Mail Classic.
For the latest version of Yahoo Mail:
From the left side of your Yahoo mail screen, right below the Yahoo mail logo, select the Contacts tab.
Now you will see a new window with all of your contacts and the actions you can take, select the Actions tab which will be present right in the middle of the screen.
Now you will see a drop down list of different actions that can be taken on your contacts. Select Export All option.
After clicking on Export All tab, you will be presented with a list of programs where you can export the contacts including MS Outlook, Netscape/Thunderbird, Yahoo CSV, vCard single file, vCard, zip file.
Choose the option according to your needs and press the Export Now tab present in front of your desired option. After that you may or may not be presented with a CAPTCHA code. Simply rewrite the characters shown in the image and press Export Now.
It is all done now; your Yahoo mail screen will now start exporting the contacts.
For Yahoo Mail Classic Users:
If you are still using old version of Yahoo mail i.e. Yahoo mail classic then you will have to follow the following procedure.
Select the Contacts tab from the left hand side of the mail screen.
Now select Tools option and then click on Export. Choose your desired programs where you want to export then press Export Now. Enter the characters shown in the text field provided and press Export Now.