Hackers use these directories to understand the structure of a server.

The specific string intitle: "index of" is a Google Dork. It tells the search engine to look for specific patterns in page titles.

In Apache, use Options -Indexes in your .htaccess file.