The .htpasswd file is used to store usernames and passwords, used in conjunction with the .htaccess file. Below is a basic example of how to create a .htpasswd file.
htpasswd -c .htpasswd joe
The above command would create a file named .htpasswd with the username joe. Once created, a prompt to enter the password for joe will appear twice.