We give an elementary introduction to the theory of matrix models, as applied to the study of 2 D quantum gravity. Starting from the sum over surfaces, we explain carefully the steps leading to the non-perturbative solution: discretization, duality, diagram-counting techniques, 1/N expansion, double-scaling limit, etc. Many examples are worked out in detail, and a pedagogical discussion of the concepts of universality and the non-perturbative ambiguity is presented.