When a sound is recorded for storage on a digital device, the same is sampled at regular intervals and the height of the wave is stored as a number. The number of times that this happens per second is called the sampling frequency and is measured in Hertz. The number of bits used to stored the sample is called the sample size, or sometimes the bit depth.
The width of the display below represents one second of sound. You can adjust the controls at the bottom to see the impact on the samples taken and how closely the track the original sound wave. Note the strange things that can happen if the sampling frequency is lower than the audio frequency. There is another page to show how sampling is used to record a real sound.