A hash function takes an input of any size and produces a fixed-length string of characters, called a digest. The same input always produces the same output, but even a tiny change to the input produces a completely different hash. This makes hashing useful for verifying data integrity, storing passwords securely, and creating digital signatures.
Unlike encryption, hashing is a one-way process. You cannot reverse a hash to recover the original input. This property is what makes cryptographic hash functions valuable for security. When you hash a password before storing it, even if an attacker gets the stored hash, they cannot directly recover the original password from it.