All cryptocurrency transfers (between digital wallets) are recorded in a public ledger (the blockchain).
Anybody can read it. But only those with the correct encryption keys to a wallet can write to it (add a record). Once someone steals the encryption key of your wallet A, it can be used to access your wallet and add a record to the public ledger that all the cryptocurrency of wallet A has been transferred to wallet B. This record cannot be changed by anyone.
But since every transaction on the ledger is a public record that anyone can read, one can theoretically track where the cryptocurrency goes from one wallet to another. This can be used to catch a thief by the police. Anyone can create a digital wallet anonymously, but to convert it into real currency you need to provide your real life identity and bank account to a crypto-exchange. This is the point where someone becomes exposed and loses their anonymity, and hence can be identified by the law.