This textbook on the calculus of variations leads the reader from the basics to modern aspects of the theory. One-dimensional problems and the classical issues such as Euler-Lagrange equations are treated, as are Noether's theorem, Hamilton-Jacobi theory, and in particular geodesic lines, thereby developing some important geometric and topological aspects. The basic ideas of optimal control theory are also given. The second part of the book deals with multiple integrals. After a review of Lebesgue integration, Banach and Hilbert space theory and Sobolev spaces (with complete and detailed proofs), there is a treatment of the direct methods and the fundamental lower semicontinuity theorems. Subsequent chapters introduce the basic concepts of the modern calculus of variations, namely relaxation, Gamma convergence, bifurcation theory and minimax methods based on the Palais-Smale condition. The prerequisites are knowledge of the basic results from calculus of one and several variables. After having studied this book, the reader will be well equipped to read research papers in the calculus of variations.