How to sync Yahoo Mail with OS X?
The problem is likely to be that Yahoo Mail runs on POP3 normally as opposed to IMAP. Without going through all the technical details all you really need to know is that POP is all about the Server talking to you in one direction, your mail client isn't talking back, whereas IMAP is a two way street - as in, when you delete something in your mail client, it gets deleted on the server.

SO, what has likely happened is you were running a mail client on your PC (like outlook probably), and when you delete mail that you've red or sent etc. or clear out any of your folders, it only deletes the mail on your PC, not on the server, and all your old messages are still there. What this means is a significant anti-clutter session may be necessary on your end of things.

To solve the problem for future, there is a way to setup IMAP mail transfer with Yahoo Mail, but rather than ramble on here I'm just gonna give you a link to this youtube video which will show you how to set it up.

Hope this helps.