All this is very classic, you can find it in the book of Hartshorne for example.
Assume we have a space $X$ and an local homeomorphism $\pi : Y \to X$. For every open $U \subset X$ we can look at the continuous maps $s : U \to Y$ such that $\pi \circ s = id_U$. These maps are "sections" in the classical sens, and of course you can take the restriction. Therefore, this space gives you a sheaf $\mathscr S(U) := \{s:U \to Y \mid \pi \circ s = id_U, \text{s is continous} \}$. The canonical examples are the covering spaces (or vector bundles,etc...).
But in fact every sheaf can be obtained in this way. Now assume you have a sheaf $\mathscr F$ on some space $X$. You can construct a space $Y$, called the étalé space of $\mathscr F$. As a set, $Y = \cup_{p \in X}\mathscr F_x$.
We obtain a covering map $\pi :Y \to X$. We define the topology on $Y$ in the following way : if $f \in \mathscr F(U)$ then $[U,f]$ be all the germs $s_y$ such that $s_y = f_y$ and $y \in U$. Then, all the $[U,f]$ form a basis for a topology, and $\pi$ is now a local homeomorphism. We just have to see that we recover the original sheaf but the stalk $\mathscr F_x \cong \mathscr S_x$ are naturally isomorphic so every sheaf arise as the sheaf of sections of an étalé space.
So a sheaf could be seen exactly as a map $\pi : Y \to X $ which is a local homeomorphism. In fact, this is the definition taken in the book of Godement, or FAC for example.