As you might expect, most of the security-related features built into Mac OS X are configured in the Security pane of System Preferences. That preference pane is, in turn, divided into three tabs: General, FileVault, and Firewall. In this section, I describe the settings you can adjust in the General pane.
Even if you have Mac OS X configured to require your password when you log in (as described next), that single act of authenticating can last indefinitely — until you manually log out, restart, or shut down. If you leave your Mac on all the time, that means your account (possibly including your keychain) is nearly always unlocked, and anyone else who walks up to your computer could get access to your confidential information. By default, this behavior applies even when your computer goes to sleep or when your screen saver activates.
To illustrate why this might be a bad idea, suppose you have a laptop and, as you travel between home and office, you put it to sleep instead of shutting it down so you can get back to work as quickly as possible. Now, in transit, your Mac is lost or stolen. Merely opening the lid lets anyone see whatever's on your computer; the protections afforded by requiring you to log in with your password disappear.
You can reduce this risk by clicking a single check box. Follow these steps:
Choose System Preferences to open System Preferences and then click Security to open the Security ...