Whenever you create a topic or comment, you’ll have a formatting toolbar that will let you apply most common formatting codes to your text. But what if you want to just type in the formatting?
The main formatting language for Discourse is Markdown, in particular the markdown.it variant. An online demo for that is here: https://markdown-it.github.io/
That’d probably be a good idea. A weak spot of Discourse IMO is that there’s no single place where a lot of these things are documented. “We use markdown.it, look here for how to use it, except we add these codes, and take away those. We support some BBcode; look in the source code to see which codes. We support some HTML, look in the source.”
Of course, one issue is that supported codes can change depending on which plugins you have installed on your instance. But it still seems it shouldn’t be that hard to at least document the defaults in one place–and Discourse doesn’t do that, at least not that I’ve found.