A sitemap is an XML document that tells search engines which URLs on a site exist + when they were last modified. The format is standardised at sitemaps.org: a <urlset> containing one <url> per page, each with <loc> (URL) and optionally <lastmod>, <changefreq>, <priority>.
Submit your sitemap to Google Search Console and Bing Webmaster Tools, and reference it from robots.txt (Sitemap: https://yoursite.com/sitemap.xml). For sites over 50,000 URLs or 50MB, split into multiple sitemap files and reference them from a sitemap index.
Only include URLs you want indexed. Don't list noindex pages, paginated duplicates, faceted-navigation URLs, or admin paths. Mismatch between sitemap and robots-txt blocks shows up as "Submitted URL blocked by robots.txt" warnings in Search Console.