In the directory which you want to protect, create a .htaccess file which contains:
AuthUserFile /full/path/to/passfile
AuthName "protected area"
AuthType Basic
<Limit GET POST>
require valid-user
</Limit>
Now the /full/path/to/passfile need to be the full path.
OK, now just make a passfile use this format
username1

assword It needs to say username : Password for some reason the exmple to the left is not working.
...
The passwords must be encrypted.
When people go to that directory they will be asked for there password.