simpliest method is the use of .htaccess and .htpasswd file hidden below root. this will protect an entire directory. Next step up is using the .htaccess to talk to a mysql DB, the there is just going full out SQL authentication with a login page and a SQL DB. Off course you would want to at least md5 your passwords to encrypt them.
The above is assuming a *nix platform and apache + PHP is installed.