A hash algorithm
is a function
that takes a string
and converts it to a numeric code. It's used in cryptography, fast data lookup and error correction codes.
The algorithm is devised so that the range of values is reasonably spread and the chances of collisions (where two strings have the same hash value) is minimized.
In cryptography, hashes of a password can be sent to a server and compared against the stored hash values there. This prevents the password being intercepted in plain text.
A good hash algorithm should be one way so there's no reverse function that takes a hash and regenerates the original value.