Windows users can easily lock their computer when they step away by hitting Win+L; on the Mac, there's no default keyboard-friendly system lock shortcut. Quick tip site One Thing Well offers a simple, no add-on workaround.
All you need to know is the Shift+Ctrl+Eject shortcut. By default, this shortcut simply sleeps your display; wiggle your mouse to kill wake them up. That's nice to know, but it's not much of a lock. The solution:
Under System Preferences → Security → General, check ‘Require password after sleep or screensaver begins'.
This has the advantage of working perfectly with the keyboard combo to switch off your display.
Lock Your Mac [One Thing Well]