If you have forgotten your pattern lock or PIN code, you can attempt to enter it up to five times. Depending on your device type, on the fifth attempt you may be given a ‘forgot password’ option. If you enter your Google ID and password, you can reset your pattern or PIN and access your phone. If you’ve forgotten your login or password for Google, then you can reset this at www.gmail.com
Hope this helps.