When you take an FFT of a finite chunk of audio, the abrupt start and end create artifacts (spectral leakage) that smear the frequency information. Windowing applies a smooth fade-in/fade-out envelope (Hann, Hamming, Blackman, Kaiser windows) to the data block, reducing leakage at the cost of slightly widening the main frequency peak.
Different windows have different trade-offs: Hann window (good all-around, 32 dB sidelobe suppression), Blackman window (excellent 58 dB sidelobe suppression but wider main lobe), rectangular window (no windowing — best frequency resolution but worst leakage, useful for analyzing exact frequencies in stable signals).