The quickest way to lock your screen when you leave your desk is to use hot corners. Hot corners are activated when you move your mouse cursor to the corner of your Apple Computer.
Start by opening System Preferences located by clicking on the Apple logo in the top left corner of your screen.
In the General tab inside Security; make sure to check Require password [immediately] after sleep or screen saver begins.
When you are done, click Show All at the top and go into the under Desktop & Screen Saver options.
Go into the Screen Saver options and click on Hot Corners (in the bottom left corner of the window).
Next select the corner that you would like to have activate your Screen Saver and lock your screen.
I usually select the bottom left corner to start the screen saver.
Now when you getup just drag your mouse to the lower left corner and the screen saver turns on, since you set it to prompt for password immediately your desktop environment is now secure.