An XML sitemap lists the pages you want crawled, while robots.txt tells crawlers what they can or cannot access. They work together but do opposite jobs.
Most sites benefit from both, especially larger ones.
Both sit at the domain root: /sitemap.xml and /robots.txt.