Are you using the Account Key? If yes, you can request another code by clicking Resend on the Yahoo login page. If you still not getting the code, click Use text or email to sign in to use your alternate email address or phone number to get the verification code.
Once you successfully accessed your account, go to your account security settings and click Manage in "Yahoo Account Key". Then click Disable Account Key to disable the option.
If you're unable to access your account, use the Sign-in Helper to start the recovery process, in order to recover your account. For instructions on how to recover a Yahoo account and all the possible methods to recover it, see this article.