From several lecture notes and some posts, people claim that while schemes are constructed by gluing affine schemes over the Zariski topology, algebraic spaces are constructed by gluing affine schemes over the étale topology, which I do not really understand. Could someone explain this point carefully? Examples?

11$\begingroup$ It is only a vague heuristic, demystified by the real definition: an algebraic space is a functor $F$ on a certain category of schemes (it is not a ringed space!) such that it satisfies (i) the sheaf axiom for the etale topology, (ii) a "relative representability condition" for its diagonal, and (iii) admits an "etale cover" by the functor $h_X$ of points of a scheme $X$. So for an affine open cover $\{U_i\}$ of $X$, the functors $h_{U_i}$ constitute an "etale cover" of $F$ by (iii) and informally $F$ is a "gluing" of the $U_i$'s along the fiber products $U_i \times_F U_j$ (schemes by (ii)). $\endgroup$ – nfdc23 Feb 11 '18 at 21:44

4$\begingroup$ @nfdc23 Well, it is a ringed topos though... $\endgroup$ – Denis Nardin Feb 12 '18 at 8:55

$\begingroup$ To elaborate on Denis' comment, a DeligneMumford stack can be defined as a ringed topos locally equivalent to the etale topos of an affine scheme. I think this definition is due to Grothendieck, who called such topoi "multiplicités schématiques", but it is equivalent to the more standard definition. An algebraic space is precisely a 0truncated DM stack (i.e. such that the groupoid of maps from any other DM stack is discrete). $\endgroup$ – Marc Hoyois Jun 18 '18 at 23:14
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.
ps : I am looking for a reference. The best I found by now :
Commutative rings to algebraic spaces in one jump?
Erratum : as nfdc23 points out, some condition on the diagonal is missing. The correct definition that I copy from Chris SchommerPries answer here
Quasiseparatedness for Algebraic Spaces
is the following
Definition: An algebraic space over $S$ is a functor $X : (Sch/S)^{op} \to S_{et}$ such that
 $X$ is a sheaf on the big étale topology on S,
 $\Delta : X \to X \times_S X$ is representable, and
 there exists an $S$scheme $U \to S$ and a surjective étale morphism $U \to X$.
This is Definition 5.1.10 in Olsson's book Algebraic Spaces and Stacks https://bookstore.ams.org/coll62/ . In remark 5.1.11 he remarks that Knutson's definition includes the fact that $\Delta$ is quasicompact.
The same definition and more information can be found in the stacks project : see https://stacks.math.columbia.edu/tag/025Y and https://stacks.math.columbia.edu/tag/076M .

$\begingroup$ How is this encoding the relative representability of the diagonal? $\endgroup$ – nfdc23 Feb 12 '18 at 8:49

$\begingroup$ Could you clarify a bit what do you mean by "locally covered" in the étale case? Since any sheaf in a subcanonical topology is a colimit of representables, and there are (I believe) étale sheaves that do not correspond to any algebraic space, one indeed needs the notion of "locally covered" more restrictive than just any colimit. In the Zariski case one can simply say you have an open cover by representables, but what is it for the étale site? $\endgroup$ – მამუკა ჯიბლაძე Feb 12 '18 at 10:06

1$\begingroup$ @მამუკაჯიბლაძე I believe it means it receives a jointly surjective étale map from a disjoint union of representables. $\endgroup$ – Denis Nardin Feb 12 '18 at 12:37

$\begingroup$ @DenisNardin Sorry somehow I am confused but does not any étale sheaf have the same? $\endgroup$ – მამუკა ჯიბლაძე Feb 12 '18 at 13:03

$\begingroup$ @მამუკაჯიბლაძე I think this is the moment where we need to pay attention on whether we're working in the big or in the small étale site (if I recall correctly in the small étale site all sheaves are indeed representable by algebraic spaces). But maybe I should let people who actually know this stuff answer... $\endgroup$ – Denis Nardin Feb 12 '18 at 13:06