There are multiple ways to lock your PC when you leave its vicinity.
Option 1: Windows Key + L
Hit the Win Key + L on your keyboard. Keyboard shortcut for the lock.
Option 2: Ctrl-Alt-Del
Press Ctrl-Alt-Delete. On the menu that pops up, click Lock.
Option 3: Start button
Tap or click the Start button in the bottom-left corner. Click your user icon and then select Lock.
Option 4: Auto-lock via Screen Saver
Go to Control Panel > Appearance & Personalization > Change screen saver and then check the box for On resume, display logon screen.