  Manifolds with exceptional holonomy play an important role in string theory,
supergravity and M-theory. It is explained how one can find the holonomy
algebra of an arbitrary Riemannian or Lorentzian manifold. Using the de~Rham
and Wu decompositions, this problem is reduced to the case of locally
indecomposable manifolds. In the case of locally indecomposable Riemannian
manifolds, it is known that the holonomy algebra can be found from the analysis
of special geometric structures on the manifold. If the holonomy algebra
$\mathfrak{g}\subset\mathfrak{so}(1,n-1)$ of a locally indecomposable
Lorentzian manifold $(M,g)$ of dimension $n$ is different from
$\mathfrak{so}(1,n-1)$, then it is contained in the similitude algebra
$\mathfrak{sim}(n-2)$. There are 4 types of such holonomy algebras. Criterion
how to find the type of $\mathfrak{g}$ are given, and special geometric
structures corresponding to each type are described. To each $\mathfrak{g}$
there is a canonically associated subalgebra
$\mathfrak{h}\subset\mathfrak{so}(n-2)$. An algorithm how to find
$\mathfrak{h}$ is provided.
