If I remember correctly, this goes roughly as follows. Consider the category $\mathcal C=\operatorname{Rings}^{op}$, first endowed with the Zariski topology. You can consider sheaves on this site that are locally covered by representable sheaves. Such sheaves form a category equivalent to the category of schemes. As you can guess, if you now consider $\mathcal C$ endowed with the étale topology, you will get a category equivalent to the category of algebraic spaces.