The private file proves who you are by signing a challenge; the public line goes into the server’s authorized_keys. ed25519 is the compact modern type. The private file must be mode 0600.