Any wave can be built from simple sine waves
Joseph Fourier discovered in 1822 that any periodic wave—no matter how complex—can be expressed as a sum of simple sine waves.
A square wave looks nothing like a sine wave. But add up the right sine waves at the right frequencies, and you can build one perfectly.
Each harmonic is a sine wave at a multiple of the base frequency:
1st harmonic: 1× frequency 2nd harmonic: 2× frequency 3rd harmonic: 3× frequency ...and so on
The amplitude of each harmonic determines how much it contributes. Different patterns of amplitudes create different wave shapes.
Any time you need to analyze what frequencies are present in a signal, Fourier analysis is the tool.