A string fixed at both ends can only vibrate in patterns that fit a whole number of half wavelengths between the ends. The simplest pattern has one loop: that is the fundamental, or first harmonic. With two loops each half wavelength is half as long, so the frequency doubles: the second harmonic. Three loops give three times the fundamental, and so on. If a cello string's fundamental is 65 Hz, its harmonics are 130, 195, 260 Hz and upward.
A plucked string does not pick just one pattern. It vibrates in many at once, and you hear the fundamental as the note while the higher harmonics colour it. Touch the string lightly at its exact middle and you force a node there. The fundamental and all the other odd-numbered harmonics need that point to move, so they die away, leaving the 2nd, 4th, 6th and so on, and the note jumps up an octave.
Not every system follows fn=nf1 for every whole number. A pipe closed at one end needs a node at the closed end and an antinode at the open end, so it fits only odd numbers of quarter wavelengths, and its harmonics are f1, 3f1, 5f1. A drum skin is stranger still: its natural frequencies are not whole-number multiples at all, which is why most drums thud rather than ring with a clear note. Watch the names, too: the first overtone is the 2nd harmonic on a string, but the 3rd harmonic in a closed pipe.
Think of it like this. Harmonics are like the rungs of a ladder whose bottom rung sets the spacing: once you know the fundamental, each allowed frequency is one more equal step up, f1, 2f1, 3f1. A pipe closed at one end is a ladder with every second rung missing, and a drum is a ladder whose rungs are unevenly spaced.
Core idea. Every string or air column has a ladder of allowed frequencies set by its length and its ends: the fundamental and its multiples. The note you hear is the fundamental, and the blend of higher harmonics gives the sound its character.