Encryption is where you make data look different so it cannot be read.  There are two broad types and many variations.  No encryption is unbreakable.

One way encryption of passwords (hashing)

Passwords are commonly stored in databases.  Ideally you want to store them in a form which prevents even the database administrators from reading them as no one should know another persons password.  The recommended form of one way encryption in PHP is to use 256 sha encryption done through use of the hash() function.  Using this gives you a fixed length encrypted result which is very hard to crack.  In theory the only way is to encrypt every possible bit of text and compare it to the encrypted password (known as dictionary or brute force attacks).

You can still check passwords for log in by encrypting the log in data and then comparing it with the already encrypted password in the database.  They should be the same encrypted even though looking at them you would have no idea what they were before encryption.

Encryption and decryption of data

This might only be needed if data is sensitive.  It allows you to encrypt the data before it goes into the database and then decrypt it for use on pages.  AES_ENCRYPT is built into SQL and is recommended.  The principle is the same as used for encrypting wireless network data or encrypted Web pages.  As the data needs to be decrypted to be seen it is inherently less secure than one way encryption.  Both ends of the transaction also need to know a key which is used to encrypt and decrypt the data.  If anyone learns that key the data is no longer safe.