For instance, suppose you have a sheaf F that assigns to every open interval I on the real line the set[1] F(I) of real-valued functions defined on it. If I write F(a,b) for F((a,b)):
* f(x) = x is in all the F(a,b), since it's defined everywhere on the real line
* f(x) = 1/(x-3) isn't in F(2.9, 3.1) or even F(1,5), but it is in F(4,5)
And so on. There's an axiom that says that if you have
* f in F(I)
* g in F(J)
such that f = g everywhere on the intersection of I and J, then there is in fact some function h defined all over I ∪ J (i.e. h ∈ F(I ∪ J)) which you can restrict to I and J to get f and g respectively. So "compatible functions can be stitched together", where "compatible" means "agree on overlaps".
Sheaves give you a language to coherently[0] talk about "partially-defined" functions such as 1/(x-3) above, to stitch them together, and go from the "local" to the "global" picture and back comfortably. This last point is actually a hallmark of mathematics in the last one or two centuries: for instance, consider some equation which you want to find integer solutions for. If you want to show it has no solutions, you can reduce both sides modulo some number and show that there are no solutions mod n, which means it is impossible to find any solutions to begin with. It is a much more deep fact (the Hasse principle) that if you can find solutions mod all n (and a real one), you can always solve the original equation! (I'm fudging a bit here: see [2] for details.)
(Quick plug: I have a short post that talks about these things here[3], as well as another on the "p-adic" numbers that appear in the Hasse principle.)
Sheaves are general enough ("data" can mean[4] almost anything!) that Paul Cohen used them to prove the independence of the axiom of choice[5] from the Zermelo-Fränkel axioms (which is hard set theory) even though they were created for geometry, broadly speaking: in particular, they were one of the tools with which Grothendieck and his collaborators powerfully recast algebraic geometry in the 20th century, giving birth to "scheme theory"[6], which is e.g. vital in modern number theory. (I should probably mention the standard example of Wiles' proof of the Taniyama-Shimura conjecture that settled FLT.)
Cool stuff.
[0]: excuse the pun
[1]: ring, really
[2]: https://en.m.wikipedia.org/wiki/Hasse_principle
[3]: https://mrkgnao.github.io/schemes-i/
[4]: Well, a sheaf can be defined as a certain kind of contravariant functor into a category, which one can think of as the "type" of our data.