What you need:
FTP access to your server
Basig knowledge of websites
Let's get started:
Open Notepad and create a file. This needs to be in it:
AuthName "Title of log-in screen"
You need to change "Title of log-in screen" to something you want. Don't forget to keep the quotes though.
Now, when using notepad, go to save as... and save it as ".htaccess" (without the ""). Don't forget to choose 'all types' and not .txt. Otherwise you can always rename the file to '.htaccess' in the FTP browser.
The .htpasswd needs to contain a username and a encrypted password. A good tool to encrypt passwords is found here:
With notepad, save it as '.htpasswd' or again, rename it within the FTP browser.
Everything is set up now, though, make sure you got these things right:
You've put the .htpasswd file in the right directory you specified in the .htaccess file.
You've got the right names. '.htpasswd' and '.htaccess' and you are sure the .'s are there too.
You've put the .htaccess file in the directory on your server you want to protect.
You've encrypted the passwords.