I don't understand how a computer can know if a password is partially correct.
The way that passwords are typical stored, there's no such thing as a partially correct value.
Passwords are never (should never be) stored as-is. You run them through an algorithm (a one-way cryptographic hash) which spits out a long gobbledygook string, which looks like c11083b4b0a7743af. This string is what is actually stored, not your password.
When a bad guy is trying to crack passwords, they also have to hash their guesses and then compare that result to the result in the password table. When they match, they know they have guessed the password.
There are two main characteristics of one-way hashes that are useful in this case. "One-way" means that you can't start with c11083b4b0a7743af and back-calculate what the password is. That's why it is safe to store the hashed value rather than the plain text password.
The other important feature--and this answers your question--is that even the smallest difference between two passwords should result in very different hashes, so even a password off by the last letter will have a totally different hashed value.
Therefore, it's not possible to know if you have a partially correct password guess. You either know the whole password or you have no clue how close you are.