I found this great article about the evolution of the typewriter on the site of the Science Museum in Kensington, England.
QWERTY refers to the most common form of layout of letters found on the keyboard of a typewriter or computer. The name refers to the first six letters at the top of the board. The initial idea and later development of this design came from one of the first pioneers of the typewriter, Christopher Sholes, who invented the first commercially successful machine. The original layout of letters was in an ABC format, but Sholes found this continually jammed his typewriters. To solve the problem, he asked his brother-in-law, a mathematician, to work out an arrangement that would for most of the time prevent the bars from clashing. Sholes later claimed that this was a highly ‘scientific arrangement’. From this the QWERTY idea was evolved in 1873.