The Lagrange-mesh method is an approximate variational calculation with the simplicity of a mesh calculation because of the use of a consistent Gauss quadrature. The method can be used for quantum-mechanical bound-state and scattering problems with local and non-local interactions or with a semi-relativistic kinetic energy, and for solving the time-dependent Schrödinger equation. No analytical evaluation of matrix elements is needed. The accuracy is exponential in the number of mesh points and is not significantly reduced with respect to the corresponding variational calculations. Lagrange functions can be based on classical or non-classical orthogonal polynomials as well as on trigonometric and sinc functions, as described in examples. Some singularities can be handled with a regularization technique. Applications to three-body systems are discussed for various choices of coordinate systems. The helium atom and hydrogen molecular ion are presented as examples.