At a time when cohomology for sheaves on topological spaces was well established, Alexander Grothendieck wanted to define cohomology theories for other structures, his schemess. He thought of a sheaf on a topological space as a "measuring rod" for that space, and the cohomology of such a measuring rod as a rough measure for the underlying space. His goal was thus to produce a structure which would allow the definition of more general sheaves or "measuring rods"; once that was done, the model of topological cohomology theories could be followed almost verbatim.

Start with a topological space *X* and consider the sheaf of all continuous real-valued functions defined on *X*. This associates to every open set *U* in *X* the set *F*(*U*) of real-valued continuous functions defined on *U*. Whenver *U* is a subset of *V*, we have a "restriction map" from *F*(*V*) to *F*(*U*). If we interpret the topological space *X* as a category, with the open sets being the objects and a morphism from *U* to *V* if and only if *U* is a subset of *V*, then *F* is revealed as a contravariant functor from this category into the category of sets. In general, every contravariant functor from a category *C* to the category of sets is therefore called a *pre-sheaf of sets on C*. Our functor *F* has a special property: if you have an open covering (*V*_{i}) of the set *U*, and you are given mutually compatible elements of *F*(*V*_{i}), then there exists precisely one element of *F*(*U*) which restricts to all the given ones. This is the defining property of a sheaf, and a Grothendieck topology on *C* is an attempt to capture the essence of what is needed to define sheaves on *C*.

- if φ
_{1}:*U*_{1}`->`*U*is an isomorphism, then {φ_{1}:*U*_{1}`->`*U*} is a covering family of*U*. - if {φ
_{i}:*V*_{i}`->`*U*}_{i in I}is a covering family of*U*and*f*:*U*_{1}`->`*U*is a morphism, then the pullback*P*_{i}=*U*_{1}×_{U}*V*exists for every_{i}*i*in*I*, and the induced family {π_{i}:*P*_{i}`->`*U*_{1}}_{i in I}is a covering family of*U*_{1}. - if {φ
_{i}:*V*_{i}`->`*U*}_{i in I}is a covering family of*U*, and if for every*i*in*I*, {φ^{i}_{j}:*V*^{i}_{j}`->`*V*_{i}}_{j in Ji}is a covering family of*V*, then {φ_{i}_{i}φ^{i}_{j}:*V*^{i}_{j}`->`*U*}_{i in I and j in Ji}is a covering family for*U*.

In analogy, one can also define presheaves and sheaves of abelian groups, by considering contravariant functors *F* : *C* `->` **Ab**.

Once a site (a category *C* with a Grothendieck topology) is given, one can consider the category of all sheaves on this site. This is a topos, and in fact the notion of topos originated here. The category of sheaves of abelian groups is also a Grothendieck category, which essentially means that one can define cohomology theories for these sheaves — the reason for the whole construction.