Robots.txt is a plain text file at the root of your site (yoursite.com/robots.txt) that tells search engine crawlers which parts of your site they are and are not allowed to crawl. Crawlers like Googlebot check this file before crawling.
It uses simple rules. For example, Disallow: /admin/ tells crawlers to stay out of your admin area, while Allow: permits access. You can also point crawlers to your XML sitemap from here. It is commonly used to keep crawlers away from areas that offer no value in search — login pages, internal search results, or duplicate parameter URLs.
