Well if you're talking about a local account then all Windows does is run what you type through a hashing algorithm which provided you type the correct password will always produce the same hash value. This value is compared against what it has saved for your account. If it matches you're granted access. If it's off by even 1 character the hash will not match.