One way to visualise spectral leakage is as spreading of the frequency components. Each frequency component of the signal should contribute only to one single frequency of the Fourier Transform (called an FFT 'bin'): but spectral leakage causes the energy to be spread. The window function controls the spreading. The contribution from any real frequency component to a given FFT bin is weighted by the amplitude of the window function's frequency spectrum centred at the FFT bin.
For example, in the special case of a rectangular window (that is, no window at all except for the inevitable truncation) the frequency spectrum of the window function is the 'sinc' function shown below. The shape of the Fourier Transform of a window function is called the kernel.
The kernel of a rectangular window function is formally called the 'Dirichlet kernel'.
Confusingly, the Fourier Transform of a window function is often also called the window function (instead of the kernel) - we have to judge from the context whether we are talking about the frequency spectrum or the time domain function.