Htaccess (Hypertext Access) is a configuration file of apache which is used to make changes in the configuration on a directory basis.
This directory can be the root directory or subdirectory of your website.
Uses of the .htaccess file:
1)-Change the default page(i.e index.html to home.html).
2)-URL rewriting for SEO friendly URL.
3)-Custom error pages.
4)-Redirect http to https OR one domain to another domain.
5)-Block IP address OR range of IPs.