Make sure Disable Automatic Login is checked in the Security pane of System Preferences. You can also check Require Password After Sleep Or Screensaver too, this option is in the same spot.
Of course, you'll have to make sure your account has a password enabled first of all though. This is done through the Accounts pane of System Preferences.
oh and to lock it right away you can spotlight keychain access and in those prefs put show in menu bar, then you can click lock screen instantly, requiring a password