Instructions
1) In the search bar on the bottom left of your screen, type screen saver. Do not press Enter. In the list of results that appear, click Change screen saver.
2) Check the box labeled On resume, display logon screen. Then, click OK.
Outcome
Your computer will be locked automatically after the computer is idle for the set amount of time.