Not fully correct, but the general idea is there.
Why does everyone think 'md5 hash' is an attribute of a file?
MD5 is an cryptographic hashing algorithm that generates a signature (hash) that can uniquely identify a file.
Other algorithms includes SHA-1 and SHA-2.
These digests are not attributes of a file such as the file name, date modified or whatever. The hashes are generated using the algorithm based on the contents of the file, which will produce a unique hash for every unique file.