This is an interesting and complex issue, with surprises.
The guys that worked this all our originally were Harry Nyquist and Claude Shannon. They developed what became known as the Nyquist–Shannon sampling theorem (frequently referred to as the “Nyquist Theorem”). This theorem is fundamental to much digital audio technology, and digital signal processing in general.
The basic idea of the theorem is, that a band limited signal may be exactly and uniquely represented by a series of equally spaced sample values, provided that the sample rate is at least double the band limit upper frequency. In other words, to exactly reproduce a signal that has an upper frequency limit of 20 kHz, requires a sample rate of at least 40 kHz.
In practice, the limiting factor is the effectiveness of the band limiting filter. The CD standard of 44.1 kHz was agreed by the industry as the minimum sample rate for full (20 kHz) audio bandwidth, though that was possibly a bit ambitious with the filter technology available at that time. The video standard of 48 kHz was arguably more realistic at that time.
Over the past 50 years or so of digital audio development. there have been huge advances in digital filter technology, which allows practical AD/DA conversion that is very close to theoretical limits.
Here’s an interesting demonstration using Audacity:
This is a 21 kHz sine wave, amplitude 0.8. The sample rate is 44.1 kHz.
It looks nothing like a 21 kHz sine wave.
The above track clearly shows the limitations of a “dot to dot” representation of the waveform.
Fortunately, Audacity does not use a dot-to-dot representation internally, but can properly extrapolate a band limited signal - the only signal that can pass through all of the dots without exceeding the Nyquist limit of half the sample rate. We can show this by asking Audacity to resample this track at a higher sample rate.
In this image, I have resampled to 192 kHz:
Note how it now looks like a 21 kHz sine wave.
Note also that the amplitude is less than the original 0.8. This is because 21 kHz is so close to the frequency of the band limiting cut-off filter that it has been attenuated by the filter.