Here are a few ways to password-protect your Mac, and keep it safe from prying eyes.
1. Open System Preferences: Accounts: Login options
Change Automatic login to Disabled.
This will require a correct login after starting up the machine.
2. Open System Preferences: Security: General
Check “Require password to wake this computer from sleep or screen saver”.
Check “Disable automatic login”.
3. Open Utilities: Keychain Access: Preferences
Select “Show Status in Menu Bar”.
Now from the menu bar you can “Lock Screen” before you step away from your machine. This will require that a user enter the correct password to use the machine. This is much easier and faster than logging in and out.