In simple language, how do passwords work? How does an application reject the wrong password?
Almost on every reputed website password isn’t stored in plain-text. It is hashed ( Cryptographic hash function - Wikipedia) and salted. If you store passwords in plain-text then any intruder can just get hold of ’em.
A cryptographic hash function is, you can say, a mathematical algorithm (hence a function) to convert an arbitrary input (aka message) to a string (bit array, to be precise) of a fixed size, which is called a hash/digest.