Apple is most trusted device when it comes about the security, if you or someone tries to login to your account with incorrect information, Your Apple ID will get locked automatically to protect your data.
Now it will lead You to the another page, here it depends what type of security you have used to protect your device. In case of two factor authentication you will receive the code on trusted device, Just enter that code and change your password.
If You have used any security question to your Apple ID enter that and it will help you to change your password after few steps.
You can use your existing password as well to reset your password after visiting at iforgot.apple.com
If you have used the old two factor- authentication method, then you have to enter the code which you received while setting the authentication to unlock your apple ID, in addition to a code sent to your trusted device.
Unlock Apple ID – Two factor authentication
Your Apple ID will remain locked After so many unsuccessful attempts and You can try again next day.
some tips to avoid hacking of your Apple ID