In the Beginning: Etching Tin
Thomas Edison is credited with creating the first device for recording and playing back sounds in 1877. His approach used a very simple mechanism to store an analog wave mechanically. In Edison’s original phonograph, a diaphragm directly controlled a needle, and the needle scratched an analog signal onto a tinfoil cylinder:
You spoke into Edison’s device while rotating the cylinder, and the needle “recorded” what you said onto the tin. That is, as the diaphragm vibrated, so did the needle, and those vibrations impressed themselves onto the tin. To play the sound back, the needle moved over the groove scratched during recording. During playback, the vibrations pressed into the tin caused the needle to vibrate, causing the diaphragm to vibrate and play the sound.
This system was improved by Emil Berliner in 1887 to produce the gramophone, which is also a purely mechanical device using a needle and diaphragm. The gramophone’s major improvement was the use of flat records with a spiral groove, making mass production of the records easy. The modern phonograph works the same way, but the signals read by the needle are amplified electronically rather than directly vibrating a mechanical diaphragm.
Analog Wave
What is it that the needle in Edison’s phonograph is scratching onto the tin cylinder? It is an analog wave representing the vibrations created by your voice. For example, here is a graph showing the analog wave created by saying the word “hello”:
This waveform was recorded electronically rather than on tinfoil, but the principle is the same. What this graph is showing is, essentially, the position of the microphone’s diaphragm (Y axis) over time (X axis). The vibrations are very quick — the diaphragm is vibrating on the order of 1,000 oscillations per second. This is the sort of wave scratched onto the tinfoil in Edison’s device. Notice that the waveform for the word “hello” is fairly complex. A pure tone is simply a sine wave vibrating at a certain frequency, like this 500-hertz wave (500 hertz = 500 oscillations per second):
For more detail: How Analog and Digital Recording Works