Encryption software works by scrambling up data with an algorithm, and then putting it back together again. There are many algorithms available though some are proprietary. There are two ways to do this; the basic symmetric key method or the more complex asymmetric key method.
The symmetric key method of encryption both scrambles and unscrambles the data by using the same key. This means that anyone with the key that encrypts the data can also decrypt it. This method puts the data at a slight risk, however, as it is possible the data can fall into the wrong hands, especially if the sender emails the key to others. The sender can also put the key in danger if putting copies of the key onto a disk.
The asymmetric key method requires both the sender and receiver to have the same software. In this case, the receiver makes two keys that unlock with the same password. Half of the pair is public, and the sender does not need the password to encrypt the data. The other key is a private key that only the recipient can use. This private key must remain private since only the intended recipient can unscramble the data, but anyone can know the public key since it only scrambles the data.