The story
Polybius was a Greek statesman and historian of the 2nd century BC who spent years in Rome and wrote a long history of its rise. In Book 10 of his Histories he stops to discuss fire signals. Beacons, he says, could only say that something agreed in advance had happened. He wanted a way to send any message at all.
His method, which he credits to two men called Cleoxenus and Democleitus and says he improved, goes like this. Divide the alphabet into five tablets of five letters each. The signaller stands behind two screens, a little apart. Torches raised behind the left screen say which tablet; torches behind the right screen say which letter in that tablet. The receiver watches through a sighting tube, so as not to confuse the two sides, and writes the letters down.
A slow telegraph
It needs practice, Polybius admits, and short messages: every letter takes two signals, and torches have to be counted. We do not know how widely it was used. But the idea of turning letters into pairs of small numbers outlived the torches by a very long way.
Knocking on walls
American prisoners of war in North Vietnam are reported to have used a version of the square, the tap code, to talk through the walls of their cells in the 1960s and 70s: knocks for the row, a pause, knocks for the column. Their square dropped K and used C in its place. Similar knock codes are said to have been used by prisoners in Russia in the 19th century. The square also sits inside later military ciphers, among them the German ADFGVX of 1918, which has a platform of its own further down the line.
How it was broken
On its own the Polybius square hides nothing: it is a way of spelling, like Morse code, not a secret. Anyone who knows the square can read the torches. Even with the letters scrambled in the grid, each letter is still always the same pair of numbers, so a count of the pairs breaks it exactly as al-Kindi's method breaks any simple substitution.
Its real value was elsewhere: it turned writing into a small set of signals, which later cipher-makers could then shuffle, as ADFGVX did.