The story
In 1917 Gilbert Vernam, an engineer at AT&T in New York, was working on teleprinters, which sent each character as a group of five on-off pulses on a punched paper tape. He saw that a second tape of key characters could be combined with the message pulse by pulse, and that the same key tape at the other end would undo it. His patent was granted in 1919. Vernam's first machines looped a key tape, which repeated, and repeats are a weakness.
Joseph Mauborgne of the US Army Signal Corps added the missing rules: the key must be random and must never be used again. A key like that makes every message equally likely. In 2011 a historian found that a banker named Frank Miller had already described the same idea for telegraph codes in 1882, though nobody seems to have noticed at the time.
Proof
Claude Shannon proved what the clerks had sensed. In a classified wartime report of 1945, published in 1949 as Communication Theory of Secrecy Systems, he showed that a random key as long as the message, used once, gives perfect secrecy: the ciphertext tells an enemy nothing at all about the message except its length. He also showed the price: no cipher with a shorter key can be perfect.
That price is why the pad was used where it mattered most and the volume was small: by spies with tiny printed pads, by embassies, and on the Washington to Moscow hotline set up in 1963, which ran on one-time tape.
How it was broken
Never by mathematics, only by people. Under the strain of the war, some Soviet pad pages were printed twice and issued to different users. From 1943 the US Army's Signal Intelligence Service began a long study of Soviet diplomatic traffic, later called Venona. Where two messages had used the same pages, the key cancelled out just as on this board, and analysts could slowly pull both texts apart. Partial readings exposed Soviet agents in the American and British atomic projects. The work went on until 1980 and was made public in 1995.
The other failures are just as human: keys that are not truly random, pads that are captured or copied, and messages whose length alone gives something away.