Instructions for Lion:
Go to System Preferences..., and look at the Users & Groups section. Select your account, and use Change Password... button to set a password.
Then go to Security & Privacy. In the General section make sure that Require password <time> after sleep... is enabled.
Details may differ slightly for others OS X versions.
In future though, please take the time to search around for answers [google is your friend] before posting.