Hash functions are functions that take a variable length input and spit out a fixed length output. The values returned by a hash function are usually called hashes. Hash functions and their associated hash tables are used to efficiently store data in a small and nearly constant time per retrieval.
A good hash function is fast, deterministic and uniform. It also should reduce the amount of collisions. However, collisions are impossible to avoid entirely, so hash tables employ collision resolution methods.
Uses
Hash functions are exceptionally useful. They are commonly used for compression, randomization functions, ciphers and more. More importantly however for CSPC 221, they are the main driving force behind hash tables.