Here's a demonstration of an algorithm to encrypt a message using a one-time pad. All of the steps in the process are spelled out below.
The decoding process is exactly the same, except you will *subtract* the pad from your input string instead of adding it!