For security purpose it is better to have the screen lock as Pattern. If you haven’t set your lock screen as pattern you can go to Settings -> Device -> Lock screen and Screen lock and from the lock screen you could select the option Pattern where the default option would be Swipe. You will have to draw the pattern couple of times to set it. Also you will be asked to enter a pin as a backup.
Once the pattern is set, you will have to draw the pattern to unlock your phone every time. Your phone will get locked after 5 unsuccessful attempts. You can easily unlock your phone by providing your Gmail id and password or the backup pin.
Unless the Gmail id and password is entered or you enter the backup pin you can’t unlock your phone. It’s always better to setup your Gmail id before you start using your phone. During unlock entering your Gmail and password doesn’t need an internet connection (3G / Wi-Fi)
Other than pattern lock you could lock your phone by selecting options like PIN or Password. PIN accepts only numeric and Password accepts alpha numeric.