  The different facets of the $R$-matrix method are presented pedagogically in
a general framework. Two variants have been developed over the years: $(i)$ The
"calculable" $R$-matrix method is a calculational tool to derive scattering
properties from the Schr\"odinger equation in a large variety of physical
problems. It was developed rather independently in atomic and nuclear physics
with too little mutual influence. $(ii)$ The "phenomenological" $R$-matrix
method is a technique to parametrize various types of cross sections. It was
mainly (or uniquely) used in nuclear physics. Both directions are explained by
starting from the simple problem of scattering by a potential. They are
illustrated by simple examples in nuclear and atomic physics. In addition to
elastic scattering, the $R$-matrix formalism is applied to transfer and
radiative-capture reactions. We also present more recent and more ambitious
applications of the theory in nuclear physics.
