This question already has an answer here:
In Solidity there is
msg.sender whose value may be used to send Ether to the sender of the msg.
How the wallet to send money is chosen when the sender has several Wallets?
Is there concept of account in Ethereum or is "account" a feature of Ethereum Wallet program not of Ethereum itself?
That is, how accounts and wallets are related?