The discrete Fourier transform answers “what frequencies are in here?” by correlating the signal against a phasor at each candidate frequency: X[k] = Σ x[n]·e^(−i·2πkn/N). Where the signal contains bin k, that sum builds up; elsewhere it cancels. The result is the spectrum — a magnitude and a phase at every frequency, the complete alternative view of the signal. The FFT (dart’s Cooley-Tukey cousin) computes it in N log N; the DFT is the definition it accelerates. It is the workhorse that turns time into frequency across all of science.
The demo runs a 16-point DFT of a bin-3 tone and shows bin 3 lights up far above bin 5 — the frequency found: live demo
“A signal is a thing in time.” — it is equally a sum of frequencies; the DFT is the exact dictionary between the two. cited
A signal projected onto every frequency at once — time and spectrum, two names for one thing. time↔frequency
On the canonical compiler, a 16-point DFT of a bin-3 tone puts almost all energy in bin 3, far above bin 5: