Visa Card

Nowadays, most payments are made with electronic Visa cards. In some cases (for example, when paying something through the Internet), one needs to write the Visa card number. Imagine that someone, even unintentionally, makes some error and transcribes a wrong number... Does this mean that someone else (a person with a card with the wrong number) will pay it?

The answer is negative, because the identification numbers of Visa cards are designed with some check digits that detect most common errors in the transcription of these numbers.

But then, how are these check digits computed?