Also see cryptography.
A secret key algorithm (sometimes called a symmetric algorithm) is a cryptographic algorithm that uses the same key to encrypt and decrypt data. The best known algorithm is the U.S. Department of Defense's Data Encryption Standard (DES). DES, which was developed at IBM in 1977, was thought to be so difficult to break that the U.S. government restricted its exportation.
A very simple example of how a secret key algorithm might work might be substituting the letter in the alphabet prior to the target letter for each one in a message. The resulting text - "gdkkn," for example - would make no sense to someone who didn't know the algorithm used (x-1), but would be easily understood by the parties involved in the exchange as "hello."
The problem with secret or symmetric keys is how to securely get the secret keys to each end of the exchange and keep them secure after that. For this reason, an asymmetric key system is now often used that is known as the public key infrastructure (PKI).