First, only a single key pair (and therefore address) is generated automatically, and this is used for both handshaking when connecting to other nodes, and for signing transactions by the wallet. But a node can generate as many key pair as it likes, and each will have a different address.
In any event, the keys are stored in the wallet.dat file inside the blockchain directory.
And for all operations, if the node has multiple key pairs, you can choose which one is used. See for example the handshakelocal runtime parameter, and all the *from API commands.