OK, you put in a plaintext file or string, and it is transformed by an encryption algorithm into a ciphered text file or string, which seemingly has no relation to the original...simple? 🙂 If that satisfies you, don't read any more...
That'd be one way encryption. In PHP, you generally want to store things like passwords so that they can't be read. If "mypword" becomes "ekcj4.3fuddkel.vj3" via crypt() or md5(), it's not likely someone can authenticate even if they access your server's files directly, because when they type "ekcj4.3fuddkel.vj3" into your password field, it'll be wrong (it would be changed into something else by your password-checking function, because, in checking a user's password against one stored on the server, you usually encrypt the submitted password and compare it to the stored password, and if they match, set permissions accordingly).
Of course, you are talking about md5(), which is actually a hash function, and that's another issue. It's a less robust but faster method of ciphering the plaintext, but it generates a robust 'digest' using a public key encryption algorithm when used on things like email mesages. I think in PHP they just use the fast encryption, and so md5() is not considered to be as good as something like mcrypt(), which is 'reversible'. If your server has the mycrypt library, you're set up with some pretty strong stuff....