Coboundaries and Gluing in Cech Cohomology - Intuition? I'm trying to develop an intuition for Cech cohomology geometrically, but am currently failing. A lot of people seem to say that the groups $H^n$ measure obstructions to gluing local sections to get global ones. However I don't see how this works, and I think it's because I don't understand coboundaries.
I see that $H^0$ is the group of global sections. Moreover $B^1\setminus 0$ tells us all the 1-cochains arising from the failure of 0-cochains to glue to give global sections. This suggests to me that we might want to study $B^1$, but instead we quotient by it to get $H^1$. Why?
I know that $Z^1$ tells us all the 1-cochains that agree on overlaps, and obviously $B^1$ is a subset of $Z^1$. But I don't know what $Z^1$ modulo $B^1$ is meant to tell me. I especially don't see how it has anything to do with gluing things. As far as I can tell it just informs me about the consistent 1-cochains which don't have anything to do with the failure to glue 0-cochains together. What am I missing?
Edit: it has just occurred to me that maybe the thing I don't understand is the meaning of gluing here. If I have the wrong idea about that could somebody please explain what is meant by it? Many thanks!
 A: Regarding higher cohomology, I was about to write another comment, but the comments are getting a bit long, so let say a few words here. Cech theory is really a generalization of simplicial cohomology, as Liviu explained, and this is really the best way to understand where the formulas come from. But if you find that unhelpful, let me work out a basic  example.
Suppose $X$ is a $C^\infty$ or complex manifold, and let $\mathcal{O}_X$ denote either the sheaf of complex valued $C^\infty$ functions or holomorphic functions. A complex line bundle
is a manifold $L$ of the same  type with a map $L\to X$ which makes it locally a product.
In other words we have isomorphisms $\sigma_i:\mathbb{C}\times U_i\cong L|_{U_i}$. The first components of $\sigma_i^{-1}\sigma_j$ gives a Cech $1$-cocycle of $g_{ij}\in \mathcal{O}^*(U_{ij})$. If you wish to eliminate the choice of trivialization ($\sigma_i$), you need to work  with cohomology class. 
The basic topological invariant of $L$ is its first Chern class
$c_1(L)\in H^2(X,\mathbb{Z})$ which measure the failure of $L$ to be (topologically) a product. The first question is what does $H^2$ mean? The second is what is $c_1$? For 1, you can triangulate $X$, and use simplicial cohomology, or you can use Cech cohomology. The fact that the formulas are similar, means that the group may be similar. In fact, they are the same. For 2, we note that in the $C^\infty$ case, $H^1(X,\mathcal{O}_X)=0$. We can attempt
lift back to this trivial group by taking the normalized logarithm
$\frac{1}{2\pi \sqrt{-1}}\log g_{ij}$. However, because the logarithm is "multvalued", there is no guarantee that this is a cocycle. So take the Cech boundary to get
$$c_1(L) = \frac{1}{2\pi \sqrt{-1}}(\log g_{ij}+\log g_{jk}+\log g_{ki})$$
When the cohomology class defined by this vanishes, then $L$ is topologically trivial.
A: For me the easiest way to get some intutition is to look at the specific example of the sheaf $\mathcal{O}$ of holomorphic functions on $\mathbb{C}$:
Let $U$ and $V$ be open domains in $\mathbb{C}$ with non-empty intersection,
and choose a $1$-cochain $f$ for $W=U \cup V$, that is, an element of $\mathcal{O}(U \cap V)$. (We'll all the time work with respect to the cover given by $U,V$).
We are wondering when we can find a $g_1 \in \mathcal{O}(U), g_2 \in \mathcal{O}(V)$
such that $$ f=g_1 - g_2, \text{ on } U \cap V.$$
In other word, we are wondering when we can find a 0-cochain $g$ such that $$f=\delta g .$$
A necessary condition for this is that $f$ is a cocyle, i.e. $\delta f=0$. 
This means that for a cocyle $f$ we can solve the above problem precisely when $[f]=[0]$ as an element of $H^1(W,\mathcal{O})$. In particular, if $H^1(W,\mathcal{O})=0$ we can always solve it.
The "gluing" in this case comes from the Mittag-Leffler problem. A simple form of this problem is the following:
Let $s_1$ be a meromorphic function on $U$ with a single pole at point $x_1 \in U \setminus V$, and similarly, let $s_2$ be a meromorphic function on $V$ with a single pole at $x_2 \in V \setminus U$. We now ask ourselves: can we find a meromorphic function $t$ on $W$ such that $t$ is holomorphich outside of $x_1,x_2$ and such that $t$ has the "same pole" as $s_1$ at $x_1$ and the "same pole" as $s_2$ at $x_2$. Here, by "same pole" I mean that if
we locally write $s_1$ and $t$ using a Laurent-expansion around the point $x_1$, the Laurent-tails should be the same. 
So where does $H^1(W,\mathcal{O})$ enter the picture? Well, on $U \cap V$ the function $s_1 - s_2$ is holomorphic, i.e.
$$s_1 - s_2 \in \mathcal{O}(U \cap V),$$
i.e. $s_1 - s_2$ is a 1-cochain. Now, assume that we can find a 0-cochain $g$
with $$ \delta g = s_1 - s_2,$$
i.e. functions $g_1 \in \mathcal{O}(U), g_2 \in \mathcal{O}(V)$ with
$$ g_1 - g_2 = s_1 - s_2 \Leftrightarrow s_1 - g_1 = s_2 - g_2 \text{ on } U \cap V.$$
Then $s_1 - g_1$ and $s_2 - g_2$ glue together to give you a meromorphic function on $W$
which has the same poles as $t_1$ and $t_2$ at the point $x_1$ and $x_2$ respectively.
(This is of course so since $g_1$ and $g_2$ are holomorphic and thus contain no poles.)
Thus we see that the obstruction to solving the Mittag-Leffler problem is $H^1(W,\mathcal{O})$, i.e., if $H^1(W,\mathcal{O})=0$ we always have a solution to the problem.
A: If you   accept that the boundary operator of  a simiplicial complex has an intuitive explanation, then  the Cech coboundary operator should be intuitive as well.  Let me elaborate.
Suppose we are given an open cover $\newcommand{\eU}{\mathscr{U}}$ $\eU=(U_\alpha)_{\alpha\in A}$. To this     cover we associate a simplicial complex, the nerve  of the cover, denoted by  $N(\eU)$ and  defined as follows.  
The set of vertices  is $A$. Two vertices $\alpha,\beta$ are connected by an edge  if $U_\alpha\cap U_\beta\neq \emptyset$. $\newcommand{\si}{\sigma}$  A finite set
$$ \si=\lbrace\si_0,\dotsc,\si_k\rbrace\subset A $$
spans a $k$-face if the overlap
$$ U_\si:= U_{\si_0}\cap\cdots \cap U_{\si_k} $$
is nontrivial. We denote by $N_k(\eU)$ the set of $k$-faces  of $\eU$. Assume for simplicity that $A$ is linearly ordered.
If  $\newcommand{\eS}{\mathscr{S}}$ $\eS$ is the  sheaf whose cohomology you are investigatining, we set $\eS_\si:= \Gamma(U_\si, \eS)$.
A Cech $k$-cochain $f$ is  a correspondence that associates to each $k$-face $\si$  an element $\langle f, \si\rangle\in\eS_\si$.
It coboundary  $\delta f$ is defined to be the dual of the boundary operator of the simplicial complex $N(\eU)$. In other words, it is determined  by the equality
$$ \langle \delta f,\tau\rangle =\langle f,\partial \tau\rangle, $$
for any $(k+1)$-face $\tau =\lbrace\tau_0,\dotsc,\tau_{k+1}\rbrace$ of the nerve. Let me clarify this statement.
We have $\newcommand{\pa}{\partial}$
$$\partial \tau =\sum_{i=0}^{k+1}(-1)^i\pa_i\tau,\;\;\pa_i\tau:=\tau\setminus \lbrace i\rbrace, $$ 
Note that $U_{\pa_i\tau}\supset U_\tau$ for any $i\in\tau$, and we  define
$$ \langle f ,\tau \rangle =\sum_{i=0}^{k+1} (-1)^i \langle f,\pa_i\tau\rangle\vert_{U_\tau}. $$
A: Let $U$ denote the space we're working on and $\{U_i\}$ an open cover of $U$ (obviously $U$ may be an open set of an ambient space, but that plays no importance here). Let's assume that there is a sheaf $\mathscr F$ on $U$ and for each $i$ a section $s_i\in\mathscr F(U_i)$.
Gluing the $s_i$ means to find a section $s\in \mathscr F(U)$ such that for each $i$
$$ s|_{U_i}=s_i. $$
The obvious obstruction to this is that the $s_i$ and $s_j$ has to agree on the overlap. So, in order for such an $s$ to exist, we must have that 
$$ (s_i)|_{U_{ij}}=(s_j)|_{U_{ij}}. \tag{$\star$}$$
In other words such that
the $0$-cochain $\{(U_i,s_i)\}$ is in $Z^0=H^0$ and this is clearly enough. One could argue, which might be your motivation, that this doesn't measure failure, but indeed it measures the success of gluing. I agree.

For $H^1$ I think it is still better to think of it as the measure of failure of lifting, but because we're talking about sheaves this means gluing in practice. In other words,
consider a surjective morphism of sheaves,
$$
\mathscr F \twoheadrightarrow \mathscr F'',
$$
and  imagine wanting to lift sections of $\mathscr F''$ to $\mathscr F$. So, you start with a $t\in \mathscr F''(U)$ and from the sheaf properties you know that there exists $\mathfrak U=\{U_i\}$, an open cover of $U$, and for each $i$ a section  $t_i\in\mathscr F(U_i)$ such that $ t|_{U_i}$ is the image of  $t_i$ via the map $\mathscr F\to\mathscr F''$. 
In order to lift $t$ to $\mathscr F(U)$ you need to glue the $t_i$. For that you consider the 
the $1$-cochain $\sigma= \{(U_{ij},(t_i)|_{U_{ij}}-(t_j)|_{U_{ij}})\}$. 
Clearly $(t_i)|_{U_{ij}}-(t_j)|_{U_{ij}}$ maps to $0$ in $\mathscr F''$, so it is naturally a $1$-cochain of sections of $\mathscr F'=\ker \big[\mathscr F\to\mathscr F''\big]$. An obvious computation shows that it is in $Z^1(\mathfrak U,\mathscr F')$. 
Now observe that $\sigma\in B^1(\mathfrak U,\mathscr F')$ if and only if there exists a $0$-cochain 
$\{(U_i,t_i')\}$ of $\mathscr F'$ such that 
$$
(t_i)|_{U_{ij}}-(t_j)|_{U_{ij}} = (t_i')|_{U_{ij}}-(t_j')|_{U_{ij}}
$$
which is the same as to say that the sections 
$$
t_i-t_i'\in \mathscr F(U_i)
$$
satisfy $(\star)$ and hence they glue together to a section $t'\in\mathscr F(U)$. Notice, that 
since $t_i'\in\mathscr F'(U_i)$, the image of $t_i-t_i'$ in $\mathscr F''(U_i)$ is the same as 
the image of $t_i$, that is, $t|_{U_i}$.
In other words, the original $t\in \mathscr F''(U)$ can be lifted, or equivalently, the sections 
$t_i-t_i'\in\mathscr F(U_i)$ can be glued if and only if the above associated $1$-cocycle in 
$$
H^1(\mathfrak U, \mathscr F')=Z^1(\mathfrak U, \mathscr F')/B^1(\mathfrak U, \mathscr F')
$$
is $0$.

OK, so let's see about $H^2$. If you accept that $H^1$ is the obstruction to lifting sections, that is, lifting elements of $H^0$, then the same argument shows that $H^2$ measures the failure of lifting these obstructions. 
Suppose you have a surjective map between two short exact sequences:
$$
\begin{matrix}
0  &  & 0 \\
 \downarrow & & \downarrow \\
\mathscr F'   &  \twoheadrightarrow   &  \mathscr G' \\
 \downarrow & & \downarrow \\
\mathscr F   &  \twoheadrightarrow   &  \mathscr G \\
 \downarrow & & \downarrow \\
\mathscr F''   &  \twoheadrightarrow   &  \mathscr G'' \\
 \downarrow & & \downarrow \\
0  &  & 0 \\
\end{matrix}
$$
and let $\mathscr K'=\ker\big[ \mathscr F'\to \mathscr G'\big]$,
$\mathscr K=\ker\big[ \mathscr F\to \mathscr G\big]$, and
$\mathscr K''=\ker\big[ \mathscr F''\to \mathscr G''\big]$, so by the $9$ lemma there is a short exact sequence
$$
0 \to \mathscr K' \to \mathscr K\to \mathscr K'' \to 0
$$
Then as we found above, $H^1(\mathscr K'')$ measures the failure of lifting sections from $\mathscr G''$ (or equivalently gluing the local liftings) and $H^1(\mathscr K)$ measures the failure of lifting sections from $\mathscr G$ (or equivalently gluing the local liftings). The morphism induces a natural map 
$$
H^1(\mathscr K)\to H^1(\mathscr K'')
$$
which is compatible with the above diagram in the sense that if $t\in \mathscr G(U)$ is a section, then the obstruction of lifting this to $\mathscr F(U)$ in $H^1(\mathscr K)$ maps to the obstruction 
(in $H^1(\mathscr K'')$)
of lifting the image of $t$ in $\mathscr G''$ to $\mathscr F''$.
Now if you start with an element of $H^1(\mathscr K'')$, which could be an obstruction to lifting some section of $\mathscr G''$ to $\mathscr F''$, then the obstruction to lifting this to an element of $H^1(\mathscr K)$ lies in $H^2(\mathscr K')$. Of course, this is nothing else but saying in words what the long exact cohomology sequence means, but if you write down how these cohomology elements can be represented by a Cech cocycle and try to lift them by lifting locally and then gluing following the exact same steps as above, then you will get exactly this. 

To get higher cohomology groups, you may iterate this process. Of course, it gets pretty hairy very soon. 
Let me add that in my opinion the best way to understand higher cohomology is that it is the lower cohomology of syzygies. In other words, consider a sheaf $\mathscr F$ and embed it into an acyclic (e.g., flasque or injective or flabby or soft) sheaf. So you get a short exact sequence:
$$
0\to \mathscr F\to \mathscr A\to \mathscr G \to 0 
$$
Since $\mathscr A$ is acyclic, we have that for $i>0$
$$
H^{i+1}(\mathscr F)\simeq H^i(\mathscr G),
$$
so if you understand what $H^1$ means, then $H^2$ of $\mathscr F$ is just $H^1$ of $\mathscr G$, 
$H^3$ of $\mathscr F$ is just $H^2$ of $\mathscr G$ and so on. 
This, of course, is not special to Cech cohomology, but you can use Cech cohomology to get a feeling for $H^1$ and then use this to get a feeling for $H^{>1}$.
