Welcome to WebmasterWorld Guest from 126.96.36.199
There are lots of ways to make sites password protected some dependent on your host's operating system.
Rather than try to teach it here in a post, I would recommend you look through certain websites with detailed instructions.
One of the most popular methods on UNIX platforms is the htaccess file method, in which the htaccess file references a list of acceptable users and passwords before letting someone see the file.
There will be lots of help forthcoming.
Welcome to WebmasterWorld. Be sure to read Marcia's introduction & guide [webmasterworld.com].
My preferred method of security, is by using the htaccess method. This is possibly the most secure on the unix platform [as txbakers said].
Take a look at the below post, and in particular msg#3, which explains how to implement and use htaccess.
Login Password & Usernames [webmasterworld.com]