Hash functions are mathematical algorithms that take an input (or message) and produce a fixed-size string of characters, which is typically a hash value or hash code. The output is unique to the input, meaning even a small change in the input will result in a significantly different hash value.