Relative version of sheaf cohomology? Is there a relative version of sheaf cohomology?
EDIT: I rather mean the cohomology of pairs.
 A: It turns out that my previous answer dealt with the wrong question.  The answer to the
new question is also yes:
local cohomology $H\_Z(X,\mathcal F)$ corresponds to cohomology of the pair $(X,X\setminus Z)$. 
A: I would think -- but this is for the moment a thought, not meant as an authoritative answer -- that every notion of cohomology whatsoever has a relative version in this sense.
I am thinking here of the general abstract definition of cohomology as exposed at nLab:cohomology.
This includes in particular the special case of sheaf cohomology as described there in some detail.
What I expect the fully general notion of relative cohomology from this point of view to be I have now briefly indicated at relative cohomology. I'd believe this does in particular reproduce the definition given in Emerton's answer.
A: To elaborate on Kevin's comment: If $f: X \to S$, and $\mathcal F$ is a sheaf on
$X$, then $f\_*\mathcal F$ is the sheaf on $S$ defined by $H^0(U,f\_*\mathcal F)
:= H^0(f^{-1}(U),\mathcal F).$
Taking the derived functors of $f\_*$ gives functors $R^if\_*$, and it turns out
(fairly easily) that $R^if\_*(\mathcal F)(U)$ is the sheaf associated to the presheaf
$U \mapsto H^i(f^{-1}(U),\mathcal F)$.  If $i > 0,$ then this presheaf may not be
a sheaf (unlike the $i = 0$ case), and this is related to the fact that it can be a little subtle to compute the stalks of $R^if\_*\mathcal F$ in general; for example, it need not
be the case in general that the stalk $(R^if\_*\mathcal F)_s$ is equal to
$H^i(f^{-1}(s),\mathcal F)$.  (E.g. think about the case when $f$ is the inclusion of
a punctured disk into a disk, $\mathcal F$ is the constant sheaf ${\mathbb Z}$,
and $s$ is the centre of the disk (so that $f^{-1}(s)$ is empty).)
In other words, $R^if\_*\mathcal F$ does not always literally interpolate the cohomology
of the fibres.
There is one case where one knows that $R^if\_*\mathcal F$  does  interpolate
the cohomology of the fibres: if the map $f$ is proper, than the proper base-change theorem
says that the stalk of $R^if\_*\mathcal F$ at $s$ is the cohomology of $\mathcal F$ along
the fibre of $s$. (One good place for these kinds of facts is the beginning of Borel's book on Intersection Cohomology.)
Also, in the context of maps of varieties, if $f$ is proper and $\mathcal F$ is a coherent
sheaf, then the completed stalk of $R^if\_* \mathcal F$ at $s$ coincides with the cohomology
of the pull-back of $\mathcal F$ to the formal completion of $f^{-1}(s)$ in $X$. (This is Grothendieck's proper base-change theorem, proved in some form in Hartshorne, Ch. III.)
A: All the current answers are sort of alluding to the following, but not saying it explicitly.
In any setup where you have the six functors (de Rham, Betti = sheaves of vector spaces on topological spaces, $\ell$-adic cohomology,... ) and $i:Z\to X$ is a closed embedding, then the local cohomology is defined as
$$\mathcal{H}_Z(X,\mathcal{F})\ =\ \text{H}^*(Z,i^!\mathcal{F})$$
so we have an analogue of $\text{H}^*(X,X\setminus Z)$ for any of your favourite cohomology theories (or others like stable homotopy theory, algebraic cobordism, K theory, Chow, ... ). Then using all the properties of the six functors (Gysin sequence etc), you get the standard e.g. long exact sequences involving local/relative cohomology.
