MD5 is a mathematical algorithm, used in encryption and other security applications.
When you run MD5 software on a file it performs the calculation and out comes a long hexedecimal number which is refered to as the MD5 checksum.
It's customary for this checksum to be posted along with the link to files such as ROMs and radios.
When you download, you can then run your own MD5 software on the downloaded file. It will perform the exact same mathematical calculation and give you the MD5 checksum of the file you have downloaded.
If your checksum matches the one posted by the dev, you can be sure you have an accurate copy of the downloaded file. If they don't match, then your download is either corrupt, or possibly some kind of trojan.
You should never install any software if the MD5 sum does not match the one provided by the dev. Instead, try downloading the file again, perhaps from a different mirror. If all else fails, contact the dev as it's possible they might have posted an incorrect checksum, or may have an alternate means by which you can obtain the file.
The MD5 checksum for a file is a 128-bit value, something like a fingerprint of the file. There is a very small possibility of getting two identical checksums of two different files. This feature can be useful both for comparing the files and their integrity control.
Let us imagine a situation that will help you to understand how the checksum works.
Person1 and person2 have two similar huge files. How do we know that they are different without sending them to each other? We simply have to calculate the checksums of these files and compare them.
The RFC 1321 describes MD5 checksum (MD5 message-digest) as:
The algorithm takes as input a message of arbitrary length and produces as output a 128-bit "fingerprint" or "message digest" of the input. It is conjectured that it is computationally infeasible to produce two messages having the same message digest, or to produce any message having a given prespecified target message digest. The MD5 algorithm is intended for digital signature applications, where a large file must be "compressed" in a secure manner before being encrypted with a private (secret) key under a public-key cryptosystem such as RSA.
The MD5 algorithm is designed to be quite fast on 32-bit machines. In addition, the MD5 algorithm does not require any large substitution tables; the algorithm can be coded quite compactly.
You cam find detal of it at http://www.fastsum.com/rfc1321.php
More at http://en.wikipedia.org/wiki/MD5