When creating a Bitcoin account, you need to issue a couple of private/public ECDSA-keys. Then, you derive your account address by taking a 160-bit hash (through sha-256 and ripemd) of the public key and use a custom base58 algorithm to convert it to alphanumerical values (see the picture below, I took it from this page).
My question is that collisions might happen (not necessary malicious ones, but incidental ones). I would like to know if there is a specific mechanism in the Bitcoin protocol to sort out these collisions and be ensured that the payment is going to the right place.
In fact, I tried to look down at the protocol details but could not find anything dealing with this problem. The only reference I found is on the Bitcoin-wiki and it states that:
Collisions (lack thereof)
Since Bitcoin addresses are basically random numbers, it is possible, although extremely unlikely, for two people to independently generate the same address. This is called a collision. If this happens, then both the original owner of the address and the colliding owner could spend money sent to that address. It would not be possible for the colliding person to spend the original owner's entire wallet (or vice versa). If you were to intentionally try to make a collision, it would currently take 2^107 times longer to generate a colliding Bitcoin address than to generate a block. As long as the signing and hashing algorithms remain cryptographically strong, it will likely always be more profitable to collect generations and transaction fees than to try to create collisions.
It is more likely that the Earth is destroyed in the next 5 seconds, than that a collision occur in the next millenium.
I found this explanation extremely unsatisfactory... If some of you has a better explanation than that or knows about a prevention mechanism that has been planted into the Bitcoin protocol, I would be delighted to read from it.