Ethereum has the hash function keccak256 built-in, which is a version of SHA3. A hash function basically maps an input into a random 256-bit hexadecimal number. A slight change in the input will cause a large change in the hash.
keccak256 expects a single parameter of type bytes. This means that we have to "pack" any parameters before calling keccak256: