Since that's kind of hard to do without threatening legal action against Yahoo or a similar tactic, I'll just go over some of the more common ways that accounts are hijacked:
The hacker installed malware on your computer, and it captured your password or a session cookie and went along and tried to change your password or something.
The hacker created a phishing site and skimmed the password from you without you realizing that it was a fraudulent page.
The hacker hacked into Yahoo's servers and grabbed their hashes and started cracking them.
The hacker may have pulled the password from a recent disclosure of passwords.