htaccess is for changing some Apache configuration directives as a request is made to the server from a browser. http://httpd.apache.org/docs/2.2/howto/htaccess.html
It is placed in root directory of apache server. It is used for placing codes of converting dynamic urls to static urls in case of dynamic page optimization.