the discrete Fourier transform
Play a chord on a piano and the air carries a single jumbled pressure wave, yet your ear effortlessly hears the separate notes inside it. The discrete Fourier transform does exactly that for a list of sampled numbers: it takes a signal recorded as N evenly-spaced samples and reports HOW MUCH of each pure frequency is hidden inside it. Where the raw samples tell you the value at each instant of time, the DFT tells you the strength and phase of every oscillation that, added together, reproduces those samples.
Concretely, given samples x_0, x_1, ..., x_{N-1}, the DFT produces N complex numbers X_0, ..., X_{N-1} by the formula X_k = sum over n from 0 to N-1 of x_n * e^(-2*pi*i*k*n/N). Think of e^(-2*pi*i*k*n/N) as a unit-length arrow spinning around a circle k full turns as n runs through the N samples; X_k measures how strongly the data lines up with that particular spinning rate. Index k = 0 gives the sum of all samples (the average, or DC level); larger k probe faster and faster wiggles. The magnitude |X_k| is the amount of that frequency present, and the angle of X_k is its phase (where the wave starts). The transform is exactly invertible: from the X_k you can rebuild the original x_n with the inverse DFT.
The DFT is the workhorse behind audio equalizers, image compression, vibration analysis, radio, and the analysis of any periodic or sampled data. Computed straight from the definition it costs O(N^2) operations — each of N outputs is a sum over N inputs — which is ruinous for the millions of samples in a song or photo. That cost is exactly what the fast Fourier transform demolishes. One honest subtlety: the DFT implicitly assumes your N samples are one period of a signal that repeats forever, so a signal whose ends do not match up cleanly produces spurious frequencies (spectral leakage).
Sample the pure tone x_n = cos(2*pi*3*n/8) at N = 8 points. Its DFT is zero everywhere except at k = 3 and k = 5 (the mirror of 3), each with magnitude 4. The transform has pinpointed the single frequency '3 cycles per window' that the raw eight numbers concealed.
Eight time samples become eight frequency amplitudes — a spike marks the hidden tone.
The DFT bins are exact only for frequencies that fit a whole number of cycles in the window. A real-world tone landing between bins smears across many of them — that is leakage, not a flaw in your data, and windowing tames it.