Depending upon screen lock type (Swipe, Pattern, etc.) the available options may vary.
From a Home screen navigate: Apps > Settings > Lock screen and security.
These instructions apply to Standard mode only.
Tap Secure lock settings.
Tap Lock automatically then select one of the following:
Tap Lock instantly with power key to turn or off .
Tap Auto factory reset to turn on or off.
Ten incorrect entries of the device password resets the device to factory default condition. All data including Google account, app data and settings, downloaded apps, etc. is removed.