The Beale cipher is a form of book cipher where a key document, such as an existing book, is used to encode a message. Each word or phrase in the message is converted into a number that corresponds to a page, line, and word in the key document. The recipient can then use the key to decode the message by looking up the corresponding words.