  A comprehensive formalism for the description of neutrino oscillations in the
Earth in a general scheme with three massive neutrinos and the mass hierarchy
m_1<<m_2<<m_3 is presented. Using this formalism, which is valid both in vacuum
and in a medium, the matter effect on the oscillations of low-energy neutrinos
is discussed, pointing out the existence of very long oscillations which are
independent of the neutrino masses and the neutrino energy, and are very
sensitive to the matter density along the neutrino trajectory. As an example of
application of the formulation, a fit of the Kamiokande atmospheric neutrino
data with the matter effect taken into account for neutrinos propagating in the
Earth is presented. The results of the fit indicate that 4*10^{-3} eV^2 < m_3^2
< 4*10^{-2} eV^2 and the oscillation amplitudes in all channels (nu_mu<->nu_e,
nu_mu<->nu_tau, nu_e<->nu_tau) could be large. Hence, long-baseline experiments
with reactor (CHOOZ and Palo Verde) and accelerator (K2K, MINOS and ICARUS)
neutrinos could observe neutrino oscillations in all channels with a relatively
large statistics.
