Strictly speaking, sheaves are not just about differential topology. And it’s also possible to get away without talking about them explicitly in differential topology. But it’s in differential topology that they really start to make their presence felt.
The best description of a sheaf I ever got doesn’t really translate to text, unfortunately. I forget the originator, as told to me by the professor explaining it — and if he remembers and can fill in the gap this can be recorded for posterity — but it really does capture the essence. A sheaf is a thing where the topology goes this way (moving one’s open hand around in circles at about chest level) and the algebra goes this way (moving one’s hand up and down across chest level). To be a bit more explicit, sheaves are about taking algebraic structures and localizing them to open sets in a topological space. I’ll start with the simplest versions, which are sheaves of sets. Further, I’ll actually start with something simpler: presheaves.
So, a presheaf of sets on a topological space is a choice of a set for each open set . We call the members of the elements — or the “sections” — of the presheaf “over “. But there’s an important condition on this choice: if is a smaller open subset of , then we should be able to “restrict” our element to an element . Thus, if we have an inclusion , then we have a restriction map .
These restriction maps are subject to a couple conditions. First of all, if we restrict from to itself, then we shouldn’t change anything. That is, the restriction map is always the identity map. Secondly, if we restrict from to , and then from to , we should get the same result as if we just restricted directly from to . That is, we have the equation . Because of this, we’ll often just write the restriction map as , since which subset it came from doesn’t really matter.
We can express this definition more succinctly if we remember that containment of open subsets of a topological space constitutes a partial order, and thus defines a category . The objects are the open sets themselves, and there is a unique arrow from to if . If we look closely, we’ll find that what we’ve defined as a presheaf is actually a contravariant functor from this category to the category of sets! For every arrow we have an arrow — in the “opposite direction”, since the functor is contravariant. The conditions we impose on the restriction maps just say that they preserve identity arrows and compositions.
Now, there’s nothing inherently special about sets here. We can set up exactly the same construction with any target category to define, say, a presheaf of rings to be a contravariant functor . This assigns a ring to every open set , and the restriction maps have to be ring homomorphisms. In the same way we get presheaves of groups, of abelian groups, or of vector spaces over a given field.
The one possibly confusing case is when we talk about a presheaf of modules over a presheaf of rings. In this case, say we have a presheaf of rings on a topological space . A presheaf of modules over assigns an abelian group to every open set — it’s a presheaf of abelian groups — in such a way that is a module over . The restriction map has to work with the restriction map of , so we have .
The canonical example to keep in mind is continuous, real-valued functions on a topological space. This is a sheaf of real algebras that associates to the open set the algebra of real-valued functions that are defined and continuous there. Clearly we can restrict such a function to whatever open subset we want — and, in fact, we have. The nice thing is that this gives us a way of talking about and dealing with functions on our space that may not be defined or continuous everywhere. Just work within a suitable open set where the function does play nice! If you need to work with two functions defined over different open sets, just restrict them both to their common intersection and work there. Many structures we run into in differential geometry will be naturally expressible in terms of presheaves, just like this.