The .htaccess file allows to tweak the Apache server configuration on a per-directory basis. It is useful for things like URL rewriting, client caching, url redirection, etc.
Beware that it can very easily break your site if you mess up the syntax though. Use with caution.