Then, when you make links to files in that directory, attempts to access those links will be prompted for a username and password which you have previously defined. You should know that this is not a high security system. It can be broken. Here's an example which runs through how to set up a password-protected directory. Words in italics are variable names that can be chosen by you.
Bold words are comments.
Below is the code that .htaccess needs to contain. In other words, it's how you know which username and password to type in. You can add as many require user lines as you want in the above file. Now specify the password you want to use. Make sure the file is the file named in the AuthUserFile line of your .htaccess file.