For private security, we usually set some lock screen codes. But the thing is that sometimes we forget it. So what to do then? Well Android has a way to bypass the lock screen.
If you finish your attempts Android gives you an opportunity to put in the backup code you should already have installed from your Google account. When your attempts are over, a pop up window will appear and you will have to wait a bit and after that you could byoass the lock screen by introducing the backup PIN.
This will unlock your screen and your Galaxy will go to the options page menu where you could set another lock code.