The Lagrange-mesh method is an approximate variational method taking the form of equations on a grid thanks to the use of a Gauss-quadrature approximation. The variational basis related to this Gauss quadrature is composed of Lagrange functions which are infinitely differentiable functions vanishing at all mesh points but one. This method is quite simple to use and, more importantly, can be very accurate with small number of mesh points for a number of problems. The accuracy may however be destroyed by singularities of the potential term. This difficulty can often be overcome by a regularization of the Lagrange functions which does not affect the simplicity and accuracy of the method.The principles of the Lagrange-mesh method are described, as well as various generalizations of the Lagrange functions and their regularization. The main existing meshes are reviewed and extensive formulas are provided which make the numerical calculations simple. They are in general based on classical orthogonal polynomials. The extensions to non-classical orthogonal polynomials and periodic functions are also presented.Applications start with the calculations of energies, wave functions and some observables for bound states in simple solvable models which can rather easily be used as exercises by the reader. The Dirac equation is also considered. Various problems in the continuum can also simply and accurately be solved with the Lagrange-mesh technique including multichannel scattering or scattering by non-local potentials. The method can be applied to three-body systems in appropriate systems of coordinates. Simple atomic, molecular and nuclear systems are taken as examples. The applications to the timedependent Schrödinger equation, to the Gross-Pitaevskii equation and to Hartree-Fock calculations are also discussed as well as translations and rotations on a Lagrange mesh.