Sound files contain sound in digital form.
A real sound is characterized by an amplitude that varies over time, which is called analog.
To represent an analog sound digitally, the amplitude of the sound signal is recorded at regular time intervals, and a numerical value is assigned to each recording.
The value of each sample is stored in a file.
The original signal (e.g., recorded music) can then be reconstructed from these values.
The signal is better reconstructed when the number of samples recorded per second is high.
Modern sound cards support very high sampling frequencies, with the most commonly used frequencies being 11025 Hz (Hertz), 22050 Hz, and 44100 Hz.
For example, a sampling frequency of 11025 Hz means that 11025 samples are "taken" per second.
The quality of the digitized sound also depends on the precision of the sample values.
They can be encoded with 8 or 16 bits. Eight-bit encoding allows for the representation of 255 different integer values (from -127 to +127), while 16-bit encoding allows for much more precise values (from -32167 to +32167).
Sound can also be recorded in Mono or Stereo mode.
Stereo mode naturally reproduces sound better but requires twice as many values.
The file size (which contains the sample values) is larger when the sampling configuration is more precise.
See Data Size in a WAV File