To go deeper in the analysis of Bitcoin transaction, we need to think in term of
actors. In Bitcoin, transaction are made from bitcoin addresses to bitcoin addresses. But these addresses do not correspond to indidivual actors: anyone can create as many addresses as wanted, instantaneously, at no cost. As a consequence, to guarantee some level of anonymity, actors avoid reusing addresses, and instead create new ones for each transaction. If 10 persons whant to send me some coins, I'll provide them 10 different addresses. Thus, in the blockchain, it is not possible to link those different addresses as belonging to the same person, the same actor. But this anonymity has some limits: when I want to spend those coins, I will typically plug several of them in input of the same transaction to do some payments: for instance, I received 10 transactions of 1 BTC, but I want to make a payment of 4 BTC: I will create one transaction with 4 of the payments outputs I received as inputs. At this point, it is possible to make the link between them, and to conclude that those 4 addresses belong to the same actors. The process is iterative: if addresses A and B appear as input to the same transaction, and later B and C, then I can know that A,B and C all belong to the same actors.
For several reasons, this approach is quite effective, at least to identify
major Actors such as companies and exchange. For simplicity, we can consdier that this approach works well for actors that consider it more important to optimize transaction costs than to hide their transactions. That is for instnace the case of most public wallet applications. See this
article for details.
Note that I prefer the term of
actors rather than
wallet, because in some cases actors can change their wallet or use multiple ones, or the term "wallet" might be misleading for company/services that use complex, custom transaction management.