.htpasswd - a file containing passwords for accessing the resource from the Apache web server. The authorization method using this file is called basic authentication. Some other web servers, for example, nginx, can also work with this file.
The name starts with a period, since the point in Unix-like operating systems points to the "hidden" attribute. In addition, Apache does not give on demand files whose name begins with a dot, which allows you to place a password file inside directories accessible to anonymous users.