As anyone who's used a typewriter knows, if you strike two keys that are next to each other in rapid succession, they keys will very likely jam up, and you have to un-stick them manually, getting ink from the ribbon all over your fingers.
The QWERTY layout, therefore, was (allegedly, at least) designed to keep this from happening by putting frequent key combinations as far away from each other as possible.
Sometime in the early 20th century (I think), Dr. August Dvorak (yes, a cousin of the composer, or at least distant relative) developed his own layout. Instead of focusing on keys jamming up, his layout focuses on typing efficiency.