Where are {image_style} and {scheme} coming from? I can't find much documentation on this subject other than https://www.drupal.org/node/2122201. This leads me to think that the subject is either much easier than I think, and doesn't have documentation because everybody knows it, or that there isn't much available.

I have been working with the last example on that page, but I can't figure out where {image_style} and {scheme} are coming from.

I need to create something pretty simple, where there's a path that links to a page that requests some data from an API. For example, if someone browses to mysite.com/example/johndoe, then the page requests data from example.com/users/johndoe and displays it. So, I need to also have access to the entry in the URL to forward it to the API with my module, not just routing a ton of pages with a certain URL pattern to a single page.

I've found plenty of documentation on static page routing, and I have understood that.
They are route parameters. See here: https://www.drupal.org/node/2186285