In Windows 8 and later, when you set up the computer at the first time, Microsoft asks you to sing in with its account (hotmail/outlook/live). If you were the one who used account password for login, then you can easily reset the password with Microsoft account service on the web. Then you can use the new password to login. However, make sure the locked computer is connected to Internet.