How are blockchain keypair private keys hidden from miners, and how are they generated in the first place?
In blockchain systems, there are no clients and servers, just peer-to-peer nodes. They connect to each other using a TCP/IP connection, but are otherwise equal. Each node does not share its private or public keys with each other. These are kept locally in every node. The node can use their keys for two purposes, both of which are performed locally:


To sign a new transaction in order to make a payment. This signature is computed locally and then broadcast to the network. This does not reveal the private key, only the public key.
To check if a transaction it receives pertains to it. To do this, it checks to see if it matches its public key.


There is no further authentication taking place in the protocol. There are no user accounts, passwords, or any other form of "login".