with apache it is fairly simple...
go into the folder you want to secure...then create two files...
.HTACCESS
.HTPASSWD
then go into .htaccess with notepad and add the following text,
AuthType Basic
AuthName "NAME OF THE PASSWORD BOX"
AuthUserfile "../htdocs/FOLDERYOUWANTTOPROTECT/.htpasswd"
Require valid-user
then go in to .htpasswd with notepad and type the username and password in the following format
testuser:testpassword
and repeat as neccesary..
any questions, let me know.