Put in .htaccess file in the directory you are trying to protect:
AuthName "This Area is Password Protected"
Ideally, the .htpasswd file will be not in a public facing directory. Put this in there:
That is just a sample, you can create the code for your unique username and password here.
Note that all subdirectories of this directory will also be password protected by this same system.