A one-time pad is a method for encrypting an arbitrarily long message into unbreakable form. Security of the encryption depends entirely on the confidentiality and strict non-reuse of the pad.
The basic algorithm is outlined below: convert uppercased characters of both message and pad text to ASCII values; shift down to the 0-25 range; add message and pad values together using modular arithmetic; shift back up to uppercase range; convert from ASCII values to characters.
The decoding process is exactly the same, except the pad is subtracted from the input string instead of added to it.
Note that spaces and all punctuation will be stripped out, because of course no confidential message should include either of these character types. The pad could conceivably contain them, but it's easier just to strip them out there too.