Normally, if you want to store your emails on your hard drive, you'd use a POP3 email program. This retrieves messages to your computer and they are on your hard drive when you read them. When using web-based mail services, such as Yahoo, Gmail etc, the messages remain on the mail server. Similarly, with IMAP protocol mail remains on the provider's mail server and any computers you use with it synchronise with the server.
Gmail (and I'd assume also Yahoo) supports the retrieval of mail with a POP3 program. I'm not sure what it is you're trying to do once you have the messages downloaded to your hard drive.