A hash function maps a key to a specific index in a hash table. Good hash functions aim to distribute the key-values evenly.
We might run into hash collisions: when distinct keys might map to the same value (i.e., is not injective). All hash functions have to deal with this, which is partly why hash tables are designed to be so large.