The .htaccess file is a configuration file that can override the Web server‘s default settings. In WordPress, the .htaccess file is mostly used to rewrite permalinks so that the URLs are easier for humans to read.
WordPress administrators can choose from a number of common URL formats under Settings | Permalinks in the Administration Area. For example, they can choose a format that includes the date and title of the post, or enter a custom format. Adjusting these settings will automatically update the .htaccess file to change how the server handles permalinks.