Cryptographic hash functions produce a fixed-size hash value from a variable-size transaction input.
One of the simplest examples of a hash function is adding up the digits in a number until one is left with a single-digit output. If the input is 49, for example, then adding 4 and 9 yields 13, whose digits 1 and 3 are then summed up again to give the output of 4. Regardless of the length of the input number, the output will always be a single digit.
That is not a good algorithm, however, because, in order to perform its functions well, a hash function needs to possess several characteristics:
Hash functions are applied in many use cases, for example, as checksums to verify the integrity of computer files after their transmission of prolonged storage, or in randomizing functions.
The fact that hashes are pseudorandom and it is impossible to predict an output of any input before actually running it through the hash function ensures that miners cannot print new Bitcoins out of thin air and need to prove the work they have performed.
Join the thousands already learning crypto!