Any complex waveform (sequence of numbers) can be mathematically decomposed into a sum of sine waves of different amplitudes and frequency: this includes hissing and crashing sounds that you don't think of as having periodic vibrations. The analysis is based on dividing the possible frequencies into an even number of frequency bands that is a power of 2 (it is possible but much slower to divide the frequency range into e.g. 287 bands).
Certain kinds of sounds (vowels especially) have repeated high-amplitude sections at multiples of F0 (the number of interest here), for example 150, 300, 450, 600... and these are the "harmonics". If you look at a "spectral slice" of a sustained vowel, you see a bunch of spikes and valleys – the spikes are at that harmonic frequency, the valleys are the other stuff. Often, the spikes and valleys become indistinguishable mush. F0 is the first of those harmonics – it's the thing that other harmonics are multiples of.
This way of talking about frequency and harmonics is appropriate for vowels, but not for fricatives like [s] and [z]. The reason why this works for vowels is that the vocal folds vibrate (more or less) regularly during the production of the vowel. Therefore, there is enough of a repeating signal that you can sensibly ask "how often does this pattern repeat in a given period of time?". If the vocal folds don't vibrate, or vibrate chaotically, you can't answer the question.
Computing F0 presupposes that you are looking at a vowel-like sound that has regular harmonics. The idea of the computation is based on the fact that the shape of the waveform (during the vowel) will have a characteristic shape that repeats, and the rate of repetition is the frequency information that you seek. The actual computation requires / allows you to specify certain properties, the most important of which is having a good guess what the value of F0 is likely to be (80 vs. 500). There are points at which a vowel is so irregular in its production that you cannot meaningfully compute F0. It is a classical phonetic learning technique to look at a narrow band spectrogram where you can see the horizontal stripes, count 10 up, get the frequency of that harmonic, then divide by 10 to get F0. But I don't think that technique is used much in practical applications.
The underlying mathematical theory is that the speech signal has two source of energy: air pulsing through the glottis roughly in the shape of a triangular wave which provides most of the energy, and lower-amplitude turbulent noises where air passes through narrow channels (created by the tongue). Other factors about the cavity above the glottis shape that buzzing triangular wave into things that sound like vowels. Computation of F0 simply asks, how often does the triangular shape repeat itself. Computation of the amplification vs. suppression of some of those harmonics is a separate process.
In my opinion it is a mistake to say that the vocal folds are vibrating at 100 Hz as well as 200 Hz and 300 Hz – that's a contradiction. Instead, the vocal folds are simply vibrating at 100 Hz, and you can directly measure that. The result of that vibration is an acoustic waveform that can be mathematically decomposed into amplitude-at-frequency information. If the signal contains information up to 10,000 Hz, you can divide the amplitude information into 2 frequency bins, or 4, or 16... the larger the number, the more precise the frequency calculation. Typically (the user can use atypical settings for the calculation), there is some low amplitude number assigned to frequency range 1, 2 and so on and then as you approach F0 or a multiple of F0, amplitude rises, then falls after that peak. The peak is a "harmonic".
TL;DR – it's about the mathematical analysis of complex waveform, as first understood by Joseph Fourier.