How can I lock my Apple computer when I leave it without having to logoff or restart?
The easiest way to accomplish this is to setup a menu bar shortcut from the Keychain Access application:
Open the Keychain Access application. It’s located in Applications/Utilities. Or you can use the search mechanism, “Spotlight” at the top right hand corner of the Desktop, highlight the magnifying glass, and search for “Keychain”.
Select the Preferences from the Keychain Access menu.
Select “Show Status in Menu Bar.”
Notice a new menu bar on the top right of the screen. Select “Lock Screen” from this menu to secure your computer.