A Fourier series is a way to represent a periodic function as a sum of simple sine and cosine waves. By adding up enough harmonics (waves with frequencies that are integer multiples of the fundamental frequency), we can approximate almost any periodic shape, like square or sawtooth waves.