The motivating example is the following: 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 (Vi) of the set U, then the elements of F(U) all arise from piecing together mutually compatible elements of F(Vi). This turns F into a sheaf, and a Grothendieck topology on C is an attempt to capture the essense of what is needed to define sheaves on C.
Formally, a Grothendieck category on C is given by specifying for each object U of C families of morphisms {φi : Vi -> U}i in I, called coverging families of U, such that the following axioms are satisfied:
A presheaf on the category C is a contravariant functor F : C -> Set. If C is equipped with a Grothendieck topology, then a presheaf is called a sheaf on C if, for every covering family {φi : Vi -> U}i in I, the map F(U) -> Πi in I F(Vi) is the equalizer? of the two natural maps Πi in I F(Vi) -> Π(i, j) in I x I F(Vi ×U Vj).