Sampling
If the analogue signal is sampled too rarely, i.e. if too few conversions are carried out per second, a signal looks like this, for example:

In the example above, the signal is only sampled every 0.5 seconds. The numbers available in the microcontroller have little in common with the analogue signal. The analogue signal can no longer be reconstructed from the digital data. There is a theoretical lower limit for the sampling frequency: the sampling frequency must be more than twice as high as the highest frequency in the analogue signal. Expressed mathematically, the requirement is:
The sampling frequency should be more than twice as high as the maximum frequency occurring in the signal. Then, according to the sampling theorem (Nyquist–Shannon), the signals can theoretically be reconstructed completely.
In practice, there should be at least a factor of 5, better a factor of 10, between the sampling frequency and the signal frequency. The more sampling points there are in the signal, the easier the digital reconstruction. However, far too many sampling points bring no further advantage. With more than about 50 values, the signal can hardly be reconstructed any better. But in digital signal processing we then have a huge amount of data to process. If you notice while programming that you have to process too much data, you can reduce the sampling frequency or simply ignore intermediate values of the data.
You will often hear the term “sampling rate”. Sampling rate and sampling frequency are the same thing. You calculate the sampling rate from the time between two sampling points with the formula
During the time between two sampling points, you do not know how the voltage at the input of the AD converter behaves. You only get the numbers at the output of the ADC at the sampling points.