This book offers a systematic and self-contained approach to solve partial differential equations numerically using single and multidomain spectral methods. It contains detailed algorithms in pseudocode for the application of spectral approximations to both one and two dimensional PDEs of mathematical physics describing potentials, transport, and wave propagation. David Kopriva, a well-known researcher in the field with extensive practical experience, shows how only a few fundamental algorithms form the building blocks of any spectral code, even for problems with complex geometries. The book addresses computational and applications scientists, as it emphasizes the practical derivation and implementation of spectral methods over abstract mathematics. It is divided into two parts: First comes a primer on spectral approximation and the basic algorithms, including FFT algorithms, Gauss quadrature algorithms, and how to approximate derivatives. The second part shows how to use those algorithms to solve steady and time dependent PDEs in one and two space dimensions. Exercises and questions at the end of each chapter encourage the reader to experiment with the algorithms.