We have the idea of a wallet as we know it in the offline world. To store our cash we use a wallet to store coins and bills that we need for our expenses. In the blockchain world this happens somewhat differently. It was given the name "wallet" I imagine that in order to make an analogy and most people understood what it is. But the first observation is that cryptocurrency wallets do not store coins in "their interior".
Cryptowallets are tools that allow us to interact with the blockchain. That is, it gives us the ability in a friendly way to be able to "move" information from one side to another within a blockchain. In the case of a bitcoin cryptowallet, it allows a user A to use the balance they have in their wallet to send to a user B wallet. To make that transaction, the wallet provides the mechanisms for creating three basic elements: the public key, the private key, and the digital signature.
The public key and the private key act together, the public is used to send and the private key is used to access the balance in the wallet. In addition from the public key and the private key the public address is generated, which is the one we share. The public address is created because it is shorter and more comfortable to share it in messages. The public address is like a locator and tells the transaction where the shipment is to be directed. When user B receives, with his private key he successfully accesses and is registered in the blockchain the transfer.
In the process cryptocurrencies never leave the blockchain, they are only associated towards different public and private keys.