The Polybius square encodes each letter of the alphabet as a pair of digits (or letters) representing its row and column in a 5×5 grid. Optionally seed the grid with a keyword to scramble the alphabet, or switch to the ADFGX variant used by the German army in WWI.
Read the row label first, then the column label. With a keyword, unique letters of the keyword fill the grid first, followed by the remaining alphabet.
Devised by the Greek historian Polybius in the 2nd century BCE, the square was originally a way to transmit messages with torches: two groups of torches, the count in each indicating row and column. As a substitution cipher it offers no real security, but it forms the basis of more sophisticated systems like the Nihilist cipher, the Bifid cipher, and the WWI-era ADFGX/ADFGVX field ciphers used by the German army.