As you may be aware, Yahoo suffered a major security breach in 2014 leading to the loss of some 500 million records. If you want the full story, the NY Times have it in detail here:
What’s most worrying about this one, is that so many people have had a Yahoo account at some point – whether you have used Flickr, Yahoo Messenger or just their email services.
The important thing is: Have you used the same username or email address and password combination anywhere else? If you have then you need to be changing your password at those sites asap.
Password re-use is a highly risky strategy. Once your password has been discovered and tied to you, it will be tried everywhere. The always amusing XKCD even has a strip on it here https://xkcd.com/792/
Using a password manager, which will generate secure passwords for you as well, is a good start and LastPass is a good one. Obviously it’s important that your master password is a strong one!