htdigest [-c] filename realm username
Create or update user authentication files used by the Apache web server. The -c option is used if you wish to create the file, and will overwrite any existing files rather than update them. The three arguments are the file you wish to use as the authentication file, the realm name to which the user belongs, and the username you will update in the password file. You will be prompted for a password when you run the command.
The Apache manual contains information about authentication mechanisms, including more detail about using htdigest and the ways in which you can control access to the resources served by Apache.