There are various variations of this cipher, named after a codeword being used. Codes are usually easy to spell and remember, based on two letter syllables to ease the encoding process.
The most frequently used key is "GA-DE-RY-PO-LU-KI". Encryption is done by converting all G letters to A and A to G (same for all the other letter pairs in the codeword). The letters which are not on the list of substitutes are copied to encrypted text without changes. Same applies for spaces and digits (unless a codeword includes them).
The sentence: “Peter has a cat" after encryption with "GA-DE-RY-PO-LU-KI" key is “Odtdy hgs g cgt” while encryption with AH-CO-LD-WI-NT-ER will result in “Prnre ahs h ohn”.