In the first frames of the animation, a function f is resolved into Fourier series: a linear combination of sines and cosines (in blue). The component frequencies of these sines and cosines spread across the frequency spectrum, are represented as peaks in the frequency domain (actually Dirac delta functions, shown in the last frames of the animation). The frequency domain representation of the function, f^ (f-hat), is the collection of these peaks at the frequencies that appear in this resolution of the function.
Image (Animated gif): The Fourier transform takes an input function f (in red) in the “time domain” and converts it into a new function f-hat (in blue) in the “frequency domain”. In other words, the original function can be thought of as being “amplitude given time”, and the Fourier transform of the function is “amplitude given frequency”.
Shown here, a simple 6-component approximation of the square wave is decomposed (exactly, for simplicity) into 6 sine waves. These component frequencies show as very sharp peaks in the frequency domain of the function, shown as the blue graph. In practice, these peaks are never that sharp. That would require infinite precision.
See more: Replicate the Fourier transform time-frequency domains correspondence illustration using TikZ (at here).