Are you asking what Discourse does to allow the site to be searched by Google? If so, the best answer that I know of is in this post: Beginners guide to SEO with Discourse - #2 by Falco. There are additional details in the other posts in that topic.
One thing to note is that topic mentions the Discourse Sitemap plugin. As far as I know, search engines have no trouble indexing a Discourse site even when it doesn’t have a sitemap. The main thing to work on is creating quality content on your site that people want to read.