This book deals with the numerical approximation of partial differential equations. Its scope is to provide a thorough illustration of numerical methods, carry out their stability and convergence analysis, derive error bounds, and discuss the algorithmic aspects relative to their implementation. A sound balancing of theoretical analysis, description of algorithms and discussion of applications is one of its main features. Many kinds of problems are addressed. A comprehensive theory of Galerkin method and its variants, as well as that of collocation methods, are developed for the spatial discretization. These theories are then specified to two numerical subspace realizations of remarkable interest: the finite element method and the spectral method.