Two definition of sheaves: thoughts? This might be a naive question. However, as a absolute noob picking up cohomology theory I am deeply confused by these two definitions of sheaf that I have encountered. I definitely lack some knowledge in category theory or algebra to fully understand sheaf cohomology.
Definition 1. Defined as a presheaf (of abelian group) satisfying sheaf axioms. In particular, I perceive a sheaf as a family of abelian groups along with a family of group homomorphisms $(\mathscr{F}, ρ)$. An element of $\mathscr{F}$ has the property of “looking like a function“ and the group homomorphism is called a section.
Definition 2. Let $X$ be a topological space, then $π \colon \mathcal{F} \to X$ is a sheaf of abelian groups if and only if:

*

*$π$ is a local homeomorphism.


*For each $x \in X$, the fiber $\mathcal{F}_x := π^{−1}(x)$ is an abelian group.


*The zero section $x \to 0_x$ is continuous.


*The mapping $α$ on the fiber product $\mathcal{F} \times_π \mathcal{F} = \{ (v, w) \in \mathcal{F} \times \mathcal{F} : π(v) = π(w) \}$ by $α(v, w) = v + w$ is continuous.


*The mapping $β \colon \mathcal{F} \to \mathcal{F}$ defined by $β(v) = −v$ is continuous.
In this definition the sheaf becomes a topological space $\mathcal{F}$ characterized by $\pi \colon \mathcal{F} \to X$. So Definition 1 and Definition 2 seems somehow unrelated to me. In particular, a canonical example of Definition 1 is $\mathcal{C}(X)$, where as for Definition 2 a canonical example is $\mathcal{F} = X \times \mathbb{Z}$. When can we treat the sheaf as a topological space? What happened to the sections?
 A: The first definition is what I will call a sheaf (of Abelian groups). The second definition I will call an etale space (of Abelian groups).
The two categories are equivalent. Let’s begin with an etale space. We can construct a sheaf by defining $\mathscr{F}(U) = \{f : U \to \mathcal{F} \mid f$ is continuous and $\pi \circ f = 1|_U\}$. Here, $1|_U : U \to X$ is the inclusion function. Such an $f : U \to X$ is said to be a “partial section” of $\pi$, and $\mathscr{F}$ is said to be the “sheaf of sections of $\pi$”. We then define the group operations in the obvious way. Note that this construction doesn’t require $\pi$ to be a local homeomorphism. $\DeclareMathOperator{colim}{colim}$
To go the other way, we begin with a sheaf $\mathscr{F}$. Then we define $\mathcal{F}$ as follows. The underlying set is $\coprod\limits_{x \in X} \colim\limits_{x \in U} \mathscr{F}(U)$. Recall that for a fixed $x$, $\colim_{x \in U} \mathscr{F}(U)$ is the set of stalks at $x$. So this space is the space of all stalks. The map $\pi : \mathcal{F} \to X$ is defined in the obvious way, sending a stalk at $x$ to point $x$. And the topology on $\mathcal{F}$ has basic open sets of the form $\{(x, [S]) \mid x \in V\}$, where $V \subseteq X$ is open and $S \in \mathscr{F}(V)$. The group operations are just the stalkwise group operations. Note that this construction doesn’t require $\mathscr{F}$ to be a sheaf, merely a presheaf.
These constructions are inverse equivalences of the category of sheaves and the category of etale spaces.
A: Edit: Let me first describe how $Sh(X)$ is equivalent to $Etale/X$, where $Etale/X$ denotes the full subcategory of $Top/X$ with objects the etale morphisms (local homeomorphisms) into $X$. You can also find more detailed accounts of that equivalence in almost any book about topos theory (Sheaves  in Geometry and Logic e.g.). By $Sh(X)$ I mean sheaves which take values in $Set$. The equivalence between sheaves which take values in $Ab$ and etale bundles with a fibrewise abelian group structure then follows from the fact that they are the internal abelian group objects in $Sh(X)$ and $Etale/X$ respectively, as stated below.
The advantage is, that this approach generalizes to other kinds of algeraic structures: For example a sheaf $\mathcal F$ which takes values in $Ring$ is the same thing as an internal ring object in $Sh(X)$, which in turn is the same data as a fiberwise continuous ring structure on the etale bundle associated to $\mathcal F$. As an important example, you may consider the ring sheaf $C^0(-,\mathbb R)$ of continuous functions on $X$.
The construction is in essence the same as in Mark Savings answer, only that we do not need to take care of the abelian group structure. Given a sheaf $\mathcal F$, we form a bundle $F\to X$ by taking as an underlying set $F = \bigsqcup_{x\in X}\mathcal F _x$. We topologize the bundle by taking subsets of the form $\{ s_x|x\in U\}$, where $s\in \mathcal F(U)$ as a basis. One has to check that this turns the canonical map $F\to X$ into a local homeomorphism. Note that each $s\in \mathcal F(U)$ in this way defines a section $U\to F, x\mapsto s_x$ of the etale bundle $F\to X$. In fact, the sheaf condition will imply that each section of $F\to X$ arises in that way, so that the map of sheaves $\mathcal F\to \Gamma(-,F)$ which I have just described is in fact an isomorphism.
More generally: we can associate to each object in $Top/X$ its sheaf of sections. This yields a functor $\Gamma:Top/X \to Sh(X)$. The construction above shows how to construct from each sheaf $\mathcal F$ a bundle $B\mathcal F$ over $X$. This yields a functor $B:Sh(X)\to Top/X$. One can check that $\Gamma$ is right adjoint to $B$. The canonical map $\mathcal F\to \Gamma(-,B\mathcal F)$ which I have described above is in fact the unit of that adjunction. It is a general fact that each adjunction between to categories induces an adjoint equivalence between the full subcategories of fixpoints of both sides (fixpoints are those objects for which the unit respectively counit is an isomorphism). One can then show that every sheaf is a fixpoint on the $Sh(X)$ side, and that on the $Top/X$ side the fixpoints are precisely the etale bundles. This then gives the equivalence.
First version: Here is a different way to see that both definitions describe the same thing. It is well-known that the category of $\mathrm{Set}$-valued sheaves on a space $X$ is equivalent to the category of étale spaces over $X$. Now a sheaf of abelian groups (your first definition) is nothing but an abelian group internal to the category $\mathrm{Sh}(X)$, while your second definition describes precisely an abelian group internal to the category $\mathrm{Étale}/X$.
