In 1877, Thomas Edison and his assistants attached a needle to the diaphragm of a telephone receiver with the idea that the needle could be used to etch an impression of sound onto quickly moving paper, thus creating a recording or sound writing.
Edison understood that sound is the vibration of particles across a medium, such as air, in waves. He developed a way to imprint or record the waves so that they could be played back or turned back into sound using a second needle.
He eventually designed a device he called the phonograph that had a brass cylinder wrapped in tinfoil, which rotated and moved lengthwise when turned by a hand crank. On one side was a diaphragm, or very thin membrane, connected to a needle. When sound waves were forced into the receiving end, it caused the membrane to vibrate and the needle to etch a groove into the foil as the cylinder was being turned by the crank, thus recording sound. A second needle and an amplifier were on the other side. When the cylinder was set to the beginning and the needle placed in the grooves, the original sound was reproduced as the vibrations were amplified.
Edison created his first voice recording by shouting the words to “Mary had a little lamb” into a mouthpiece, causing the sound waves to vibrate a needle and etch the nursery rhyme into tinfoil for playback.
The phonograph was a breakthrough, as it had the ability not only to record sound, but to play it back. Edison originally thought that the phonograph would be useful in offices for dictation, for families to record their history or for teachers to record lessons. He considered applying the technology to toys such as talking dolls and music boxes.
But the phonograph proved too difficult for most people to use, and the tinfoil on which the recordings were made did not last. Interest in the machine waned as its applications proved impractical in its current state. Edison put it aside to pursue work on other inventions. When he resumed work on the phonograph nearly 10 years later, another inventor had moved it one step closer to the record player.
For more detail: How Record Players Work