MD5 (Message Digest Algorithm) is the widely used hash function generating a 128-bit hash value. MD5 hashing algorithm is used for wide range of use cases such as storing passwords in a secure way, storing credit card numbers and others sensitive data in databases, etc.
MD5 hash is used to ensure the integrity of the files. MD5 hash algorithm produces the same output for same given input. This can be used to match generated MD5 hash at senders end and receivers end to determine if sent file or the message is intact and unmodified.
MD5 hash is NOT an encryption method. It simply generates a unique hashed fingerprint for the given input. Even though, this is a one way transaction and impossible to reverse engineer to get the original string in theory, there are many tools online to retrieve the original string.