The official reference for MD5 is RFC1321. The scrambling process is reminiscent of the action of an eggbeater. Try reversing that!
Other encryption methods take a similar approach. A basic principle is to take an operation which is easy to perform on one direction, but not as trivial to reverse. Multiplication, for example. Let's say I have two prime numbers that I multiply together to get 13,580,248,586,942,396,305,648,523. Now that was pretty easy (tedious, but not too tedious). Your job is to reverse the operation and find out what the two prime numbers were.
Another thing about MD5 in particular that makes it inherently one-way is that even if it were feasible to reverse the MD5 algorithm (and if it were, it wouldn't be able to live up to one of the major reasons for its existence), it still wouldn't be possible to "unhash" an MD5 string to retrieve the original message.
Think about it. There are an infinite number of possible messages that could hash into an MD5 string. But there are fewer than 340,282,366,921 octillion possible MD5 strings - which may sound like a lot but it certainly isn't anywhere near infinite.
So there has to be at least one MD5 string out there which is the hash of an infinite number of messages; in fact, that's probably true of every MD5 string. It's even more likely that every MD5 string is the hash of at least two messages.
When such a string is supposed to be "unhashed" into a message, there would be a choice of which message to unhash it to. There might be many choices; there might be an infinite number of choices. Most of them would be gibberish, but the computer can't know that. So it has no way of knowing which of these choices is the "real" message.
In short, hashing a message into an MD5 string destroys information; there's no way of getting that destroyed information back - not without storing a copy of it somewhere else in the first place.
Further links, for encryption schemes such as 3DES, Blowfish, Arcfour, and the other algorithms supported by PHP's mcrypt functions, are available at your nearest Google outlet.