Your account may have been hacked. There have been a couple of known vulnerabilities in Yahoo security. Go to the Yahoo login page and click "I can't access my account". (Have you already done that to get the text message you got?). Do you have any other mail account that you used as your "alternative" address when you signed up for Yahoo?
Whenever you get back in, have a look at your account access history. One form of hack usually involves a mobile login from a strange location, followed immediately by an online login.
Hopefully you don't keep any sensitive information in mails stored in your account. If not, all you have to do is change your password and keep going as you were.