KeePass is pretty good, as is a similar application called Password Safe. Both have decent features and seem to be written by people who know what they are talking about (real cryptography terminology, no snake oil, etc). KeePass especially does a reasonable job, automatically clearing the clipboard after you paste your password, try to prevent clipboard loggers from knowing the clipboard was updated, etc, etc.
But they aren't magic, they do their job well, but if you're computer is completely owned, no password utility in the world is going to help. Their real purpose is to allow to you use different, strong passwords for all the services we all use these days without having to remember 35 different strong passwords. And honestly, using one weak password for everything because you can't remember anything else is a much bigger security risk than somebody totally owning your box (if you take reasonable precautions). For that, both are excellent. I use PasswordSafe because it's simple, and simple tends to lead to better security...but KeePass looks good as well.