  We analyse the eigenvectors of the adjacency matrix of a critical
Erd\H{o}s-R\'enyi graph $\mathbb G(N,d/N)$, where $d$ is of order $\log N$. We
show that its spectrum splits into two phases: a delocalized phase in the
middle of the spectrum, where the eigenvectors are completely delocalized, and
a semilocalized phase near the edges of the spectrum, where the eigenvectors
are essentially localized on a small number of vertices. In the semilocalized
phase the mass of an eigenvector is concentrated in a small number of disjoint
balls centred around resonant vertices, in each of which it is a radial
exponentially decaying function. The transition between the phases is sharp and
is manifested in a discontinuity in the localization exponent $\gamma(\mathbf
w)$ of an eigenvector $\mathbf w$, defined through $\|\mathbf w\|_\infty /
\|\mathbf w\|_2 = N^{-\gamma(\mathbf w)}$. Our results remain valid throughout
the optimal regime $\sqrt{\log N} \ll d \leq O(\log N)$.
