There’s a difference between hashing and encrypting.
Hashing is a one-way process. You store the hashed password in the database, and when a user types the password, you hash it first, and then look it up in the database. No readable passwords are stored, and you can not reconstruct the password from the hash.
Encryption is a two-way process. You can decrypt something you have encrypted, and get the original back. For encryption you need a an encryption key (called password by MySQL) which you need to provide to decrypt. You will have to store this key in your application to be able to encrypt/decrypt.
Hashing is faster then encrypting, and only use encryption when you need to be able to retrieve the original.
Also, not all algorithms are very secure. MD5 for example is easily broken. If you want security, look at bcrypt or PBKDF2. Both are not supported by MySQL, but there are PHP libraries available that provide these algorithms.
For MySQL hashing and encrypting, see http://dev.mysql.com/doc/refman/5.5/en/encryption-functions.html