How to create a login on my front-end application to a specific Discourse site?

I can’t really understand how to use this. I mean I imagine something like a login button in my website then the user needs to choose how to be authenticated right? I mean what’s the possible flow for this scenario?