When the client attempts to connect, the client and server communicate to ensure the private key that the client has matches an allowed public key on the server side.
Instead, a private key stored on the client is paired with a public key stored on the server. In case you aren't already familiar with key-based authentication, it is a way of authenticating to remote servers without using a password. If you are familiar with key-based auth for SSH to Linux servers, this process is very similar. If you want to enable key-based auth instead, you have to go through some additional steps to generate the keys and place them in the correct locations. The previous post leaves off with SSH enabled and working with username and password authentication. If you haven't yet installed and configured SSH, start by reading that first.
This is a follow up to a previous post: Getting Started with SSH on Windows Server 2019.